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
Back To Top
Search