Closed blacktop closed 9 years ago
Is there any way to contain all this in a single directory? I have no other comments beyond that since I have no idea how this is supposed to work. If @mraoul has no issues please merge it when you think it is ready! I'm still going to be limited to mobile for the next few days so I can't be of much help.
So a Dockerfile cannot access files at a higher level than what it is in.
The
path must be inside the context of the build; you cannot COPY ../something /something, because the first step of a docker build is to send the context directory (and subdirectories) to the docker daemon.
Meaning if you have the Dockerfile in the root dir I can pull the chopshop source right into the image using the COPY command. If I put it all in the docker
folder then I will have to use the git clone technique I was using in my docker-chopshop repo. This is not an issue and it will still work, it is just not how automated builds are usually done.
That isn't a problem, was a purely aesthetic comment from me. I'll leave merging this up to @mraoul. Thanks again for the work on this!
Yeah, @blacktop's implementation looks solid and follows docker's recommendations. When building an image, docker uses the working directory of the dockerfile as the 'context' for the build. @wxsBSD when you get back to work I can give you a docker primer, if you'd like. I'll have to set some stuff up on the docker registry before pulling this -- but I should get to it by the end of the week.
And by end of the week, I obviously meant in two months ... serious apologies for not getting to this until now. I've created a mitrecnd organization on docker and will be merging the commits into master very soon. Thanks again for the contribution!
You will need to replace
blacktop
indocker/docker.md
with whatever name you choose in the Docker Hub. Other possible improvements would be to create achopshop
user and run as that user to avoid running as root inside the container. However, docker is going to add namespace isolation soon and then root inside the container won’t be root outside the container. Let me know if you would like me to create a second pull request to add this.