Dynamically get docker version during image build -
i'm working on project requires me run docker within docker. currently, relying on docker client running within docker , passing in environment variable tcp address of docker daemon want communicate.
the file in dockerfile utilize install client looks this:
run curl -s https://get.docker.io/builds/linux/x86_64/docker-latest -o /usr/local/bin/docker
however, problem download latest docker version. ideally, have docker instance running container on latest version, may version behind (for illustration haven't yet upgraded 1.2 1.3). want way dynamically version of docker instance that's building dockerfile, , pass in url download appropriate version of docker. @ possible? thing can think of have env
command @ top of dockerfile, need manually set, ideally hoping set dynamically based on actual version of docker instance.
while question makes sense engineering science point of view, @ odds intention of dockerfile. if build process depended on environment, not reproducible elsewhere. there not convenient way accomplish ask.
docker
No comments:
Post a Comment