Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added COPY for requirements-app.txt #196

Closed
wants to merge 1 commit into from

Conversation

andrewwatson
Copy link

got an error when trying to use 2.7.13-onbuild to build my flask app but this fixed it

@yosifkit
Copy link
Member

yosifkit commented May 8, 2017

We are currently working toward removing onbuild images from the official images: docker-library/official-images#2076, since they are easily replaced with a more transparent Dockerfile and are inadequate beyond basic use cases as is the case you ran into with this issue.

So we recommend not using a Dockerfile of FROM python:onbuild and to instead be explicit:

FROM python:3.6

WORKDIR /usr/src/app

COPY requirements.txt requirements-app.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt

COPY . /usr/src/app

This way you can change what needs to be copied in with or instead of requirements.txt and even make it FROM python:3.6-alpine and have more control over the size of the image by adding and removing build dependencies within the layer that they are used.

@tianon tianon closed this Jun 23, 2017
@yosifkit yosifkit mentioned this pull request Jan 29, 2018
loomchild added a commit to puffinrocks/puffin that referenced this pull request May 10, 2018
Docker -onbuild images are deprecated, since they are not fully
dependable
(docker-library/official-images#2076).

I replaced it with a standard image, based on
docker-library/python#196

I also fixed the version on 3.6.4, since there's an issue with 3.6.5
(https://stackoverflow.com/questions/49627807/cryptacular-is-broken).

Closes #20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants