Passes environment variables as build args to Dockerfile

This commit is contained in:
Aaron Louie 2020-04-14 16:43:35 -04:00
parent 201e65fdbf
commit 871c021c3c
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,10 @@ export PATH=$PATH:$HOME/.local/bin;
# Build and push Docker image to Docker Hub
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin;
docker build --no-cache -t sartography/cr-connect-bpmn:latest . || exit 1;
docker build \
--build-arg APP_ENVIRONMENT="${APP_ENVIRONMENT}" \
--no-cache -t sartography/cr-connect-bpmn:latest . \
|| exit 1;
docker push sartography/cr-connect-bpmn:latest || exit 1;
# Notify UVA DCOS that Docker image has been updated