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

[tech debt] Cleaning up the Dockerfile #81

Merged
merged 3 commits into from
Mar 22, 2017

Conversation

MikeTheCanuck
Copy link
Collaborator

On the basis of PR #74, I'm now ready to cleanup tech debt in the build process and rely on the Travis build status to confirm I haven't broken anything (via the basic functional tests).

This cleanup removes three things:

  1. The now-redundant download of CSV data to the Docker image. @mxmoss confirmed for me (again, due to my poor memory) that as of a week ago, the Django APIs were all relying on the external database rather than imported CSVs to construct their data responses.
  2. The unreliable python:latest image, that @tedbrunner was unable to download when building the Docker container locally [while testing PR Travis runs automated tests! #74] on his Linux computer - he received an error "UNAUTHORIZED - authentication required" at step 1 of the docker container build, which corresponds to the error I see when I browse to the URL specified in the error output.
  3. Also, trivially it is unnecessary to instruct Docker to RUN mkdir /code when the next statement is WORKDIR /code - according to Docker docs, the WORKDIR instruction will always create the target directory if it doesn't already exist.

…experience unauthorized response from docker registry when specifying latest tag
…so removing the redundant mkdir command that precedes
Copy link
Contributor

@jimtyhurst jimtyhurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used start-proj.sh successfully with the Dockerfile set for FROM python:3.6.0. Is there any reason to stay with 3.5.3? There is nothing that we require in 3.6.0, but there are a couple of good enhancements in functionality and performance (https://docs.python.org/3/whatsnew/3.6.html).

@MikeTheCanuck
Copy link
Collaborator Author

The only reason I didn't immediately switch to the 3.6 container image as our baseline was because @tedbrunner had experienced repeatable failures when trying to run the test-proj.sh -l on his Linux machine.

I've had no such failures on my Mac.

When you tested Jim, was that on a Mac or a Linux box?

@jimtyhurst
Copy link
Contributor

I tested with MacBook Pro running MacOS 10.12.3 (Sierra), using Python 3.6.0 in my virtualenv environment budget_venv. If other environments have problems with the python:latest = python:3.6.0 image, then that is a good enough reason to stay with python:3.5 Docker image.

@MikeTheCanuck
Copy link
Collaborator Author

Thanks Jim, sounds good - I've filed Issue #85 to capture this as a future issue to investigate, when/if needed.

@MikeTheCanuck MikeTheCanuck merged commit 00e362b into master Mar 22, 2017
@MikeTheCanuck MikeTheCanuck deleted the mikethecanuck/clean-dockerfile branch March 22, 2017 06:33
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.

2 participants