Repeatable Docker builds using a locally stored Alpine package
-
- Offline
- 9 months 2 weeks ago
- 2016-09-06
I am new to Alpine...
I would like to create a Docker image based on Alpine that installs curl and tar (so that I can download and install other software during the build).
I have a version of Dockerfile that dynamically obtains these packages from a remote repository. My problem is that when I have the container built it appears that I may be getting different versions of curl and tar installed depending on where my build computer is located (i.e. local computer or Docker Hub "cloud" build computer).
Because the Docker build can use the full context of the directory structure rooted in the location of the Dockerfile, I am wondering if I can download a specific version of these (and potentially other) packages onto my computer and then do the "apk add" from a local location.
Questions:
1. Do I need to create a full local repository to do this or can I simply refer to the package file in an "add" command?
2. Where can I find specific packages to download onto my computer?
Thank you! -- Randy