3 ms·
I don’t think your Dockerfile should be downloading your dependencies and building from scratch. Let your build pipeline pull them in, run tests, and pass them
by ljm 7y ago
I don’t think your Dockerfile should be downloading your dependencies and building from scratch. Let your build pipeline pull them in, run tests, and pass them verbatim into your container.
Vendor your dependencies if you have to, or maintain a cache, but don’t make your Dockerfile redo all of that work.
- underwater 7y agoWe have a Dockerfile for builds, and a Dockerfile that consumes the built artifacts for deployment.
- deleted 7y ago[deleted]
- Lx1oG-AWb6h_ZG0 7y agothis assumes your build agent is running the same environment as the docker image. What happens when you’re running ubuntu and pull in packages that won’t work in alpine? (Or worse, if it’s windows/OSX and Linux)