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