have a docker configuraition with
- one dockercompose file
- for some service and dockerfile with extras
What i like to achive is that a i can ull latest images form dockerhub or (When they are not ok), use ny own save dockerhub images on localhost:5000
I like to use a .env var for this where a variable (TAG) is empty or filled with a prefix for the image so that the local image is pulled
I have a sort of way of doing this , and like to check if this is gonna work!
I only described the parts that are relevant for this purpose
Can somebody, a pro check this for me, i am an amateur
env file (dynamic written by script)
TAG=localhost:5000/ (or TAG is empty and then the dockerhub store is used and the default name of the image)
dockercompose
service_a (dockerfile is used, see dockerfile env/arg)
build: /home/pi/pvkmenu/services/homer/.
service_b
image: “${TAG}b4bz/homer:latest”
dockerfile for service a
ARG TAG
ENV envTAG=$TAG
FROM ${envTAG}b4bz/homer:latest
CMD
docker-compose up (same folder as .env)
(als .env op n andere plaats staat / andere naam)
docker-compose --env-file ./config/.env.dev config