Code Monkey home page Code Monkey logo

Comments (1)

GrahamDumpleton avatar GrahamDumpleton commented on July 21, 2024

Read:

It explains the process using PostgreSQL client libraries as an example.

Just be aware that instead of stuff being in the '.docker' subdirectory, the preferred name of the subdirectory is now '.whiskey' as the structure got applied also to non Docker contexts and so was generalised. Thus as explained in that post, extra build type package dependencies would be installed from:

  • .whiskey/action_hooks/pre-build

Just be aware that with this approach of using a pre-build hook script, every time you build the image it will install the package again.

If you wanted to avoid that, you would instead build a new image from the mod_wsgi-docker:python-2.7 base image and install the packages in the derived Docker image Dockerfile. Then replicate the ONBUILD structure in that derived image Dockerfile as well and base your application off it instead.

Your intermediary Dockerfile would then be something like:

FROM grahamdumpleton/mod-wsgi-docker:python-2.7

RUN apt-get update && apt-get install -y libmysqld-dev && rm -r /var/lib/apt/lists/*

WORKDIR /app

ONBUILD COPY . /app
ONBUILD RUN mod_wsgi-docker-build

EXPOSE 80
ENTRYPOINT [ "mod_wsgi-docker-start" ]

So best way depends on whether you want to fiddle around with your own intermediary ONBUILD image or not.

from mod_wsgi-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.