MOE icon indicating copy to clipboard operation
MOE copied to clipboard

Docker image build process should be more explicit about basing off a fresh repository

Open suntzu86 opened this issue 10 years ago • 3 comments

When you run:

docker build <dir>

docker builds an image with <dir> as the context; i.e., the contents of the current directory are copied to Docker. If the current directory contains the user's working files (vs a clean git repo checkout), the resulting docker image could have surprises (this already lead to a p0 for MOE) when those files

Instead, we have 3 options that I see:

  1. AT LEAST change the documentation to be clear that docker images must be built in a FRESH repo. This means it is still possible to screw up but at least maintainers have a more fool-proof set of instructions to follow. The next two solutions are more infallible.

  2. Change our Dockerfile to git checkout from master (or a specified branch) and build that (ignoring the docker context OR require that <dir> above be empty).

  3. Use Docker Automated Builds: http://docs.docker.com/docker-hub/builds/

    This requires giving docker read/write access to the MOE repo. From that and our current dockerfile, we can have docker automatically build images based on CLEAN repo checkouts. This solution is neato and clean but still requires 1 (preferred) or 2 be implemented so that manual docker image generation is documented clearly.

suntzu86 avatar Sep 10 '14 11:09 suntzu86

I would +1 implementing the first option in the opening comment. I was stuck until I found this issue and did a fresh git clone. Just letting the user know to do a fresh clone in the docs would save a lot of time/frustration

dgreis avatar Feb 17 '16 00:02 dgreis

Which opening comment? like the quickstart guide?

suntzu86 avatar Feb 22 '16 08:02 suntzu86

I mean adding it to the top of this page http://yelp.github.io/MOE/install.html

dgreis avatar Feb 23 '16 23:02 dgreis