Sign inSign up

luissalgadofreire/python

By luissalgadofreire

Updated almost 9 years ago

Creates an environment for python projects with `gettext` preinstalled.

Image
0

233

luissalgadofreire/python repository overview

About this Repo

The image in this repo creates an environment for python projects with gettext preinstalled.

Accepts the following build time arguments:

  • PIP_INDEX_URL. (Optional) Indicates to pip the index from which packages should be installed (default=https://pypi.python.org/simple).
  • PIP_EXTRA_INDEX_URL. (Optional) Indicates to pip an extra index from which packages should be installed in case they're not found in the primary index.
  • PIP_TRUSTED_HOST. (Optional) Indicates to pip that the package repository should be trusted despite being served via HTTP instead of HTTPS.

python:3.6-onbuild, python:onbuild

This image creates an environment for python projects where packages can be arbitrarily installed with pip from a requirements.txt file.

This image expects a project directory to include a Dockerfile referencing this image and a requirements file named requirements.txt.

It is based on the official python image. It:

  1. Installs python:3.6 using the official image.
  2. Installs gettext.
  3. Creates python user with UID=1000 and adds it to the users group.
  4. Sets the /usr/src/app directory as the working directory and sets python as its owner.
  5. Sets python as the owner of /usr/local.
  6. Installs packages listed in requirements.txt using pip.
  7. Copies all files in the project directory to /usr/src/app in the target container.
  8. Changes the default user from root to python.

Steps 6-7 above are triggered using the onbuild operator in the Dockerfile.

Tag summary

Content type

Image

Digest

Size

295.1 MB

Last updated

almost 9 years ago

docker pull luissalgadofreire/python:3.6-onbuild