-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
You did a lot of overhead now the resulting images are much smaller and it will build much faster greetings.
@frank-dspeed care to explain? |
Looks like he improved the Docker build process, but the message is certainly misleading and a mess. I'm not running Docker but could somebody who is test this? |
i can explain a bit every RUN Instruction runs in its own Layer and Container on docker build so every added run instruction adds a layer example i do RUN apt-get update and then RUN apt-get install and after this RUN apt-get clean then !!!! now the magic happens apt-get clean is useless because the apt-get list is still in the 2 layers before but when i for example do RUN apt-get update && apt-get install git && apt-get clean then its 1 layer that will not include the apt mirror and packet lists because i removed them befor the build container got commited! |
Then the next change docker syntax don't accepts EXPOSE 80:80 and this stuff because its simply not allowed to map host ports for security reason sure you can do this on docker run but not in docker build also every single line EXPOSE ends up in its own build container and image layer so the logic solution is EXPOSE 80 443 and so on but sorry that i got not much more time to explain maybe read the Docker Docs about building images to get deeper into that or simply do docker export yourimage > bla.tar |
@frank-dspeed got it. Though I don't see any issue with the separate RUN layers, if it overall simplifies the build process then it's ok with me. Did you test this changed Dockerfile with the rest of the docker setups that were recently added? @FedeG how does this play well with your recent |
This Dockerfile is very simplified but some layers were important for developers.
If a developer changes files in proyect but don't modify package.json, this layers are caching in future builds. 2- Layer bower before
If a developer changes files in proyect but don't modify bower.json or .bowerrc, this layers are caching in future builds. If docker have npm/bower commands in cache, the future builds are very fast. |
For developers is very important measure build time for successive builds. |
@FedeG @frank-dspeed can you guys please work to fix this PR with both of your comments? |
… production and fix this bug meanjs#1453
Commit Message Guidelines
You did a lot of overhead now the resulting images are much smaller and it will build much faster
greetings.