You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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).
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.
The text was updated successfully, but these errors were encountered:
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
When you run:
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 filesInstead, we have 3 options that I see:
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.
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).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.
The text was updated successfully, but these errors were encountered: