skip to Main Content

Reference Shell Script Variable in Dockerfile

I have a config.sh: IMAGE_NAME="back_end" APP_PORT=80 PUBLIC_PORT=8080 and a build.sh: #!/bin/bash source config.sh echo "Image name is: ${IMAGE_NAME}" sudo docker build -t ${IMAGE_NAME} . and a run.sh: #!/bin/bash source config.sh # Expose ports and run sudo docker run -it -p…

VIEW QUESTION

docker-compose.yml syntax leads to error in runtime

Is there any difference between these two configs: Config 1: ... environment: - POSTGRES_NAME='postgres' - POSTGRES_USER='postgres' - POSTGRES_PASSWORD='postgres' - POSTGRES_PORT='5432' Config 2: ... environment: - POSTGRES_NAME=postgres - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_PORT=5432 Because, when I try to docker-compose up with…

VIEW QUESTION

docker-compose build behind proxy. failed to solve: rpc error . dial tcp: lookup auth.docker.io. on rockylinux image

failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Frockylinux%3Apull&service=registry.docker.io": dial tcp:…

VIEW QUESTION
Back To Top
Search