Skip to content

Commit 77ae643

Browse files
committed
Add environment variables for Nginx and PHP Tags
1 parent 5e4c6dd commit 77ae643

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

bin/docker-build

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,27 @@ if ! [[ -f "${PWD}/.dockerignore" ]]; then
1414
cp "${PACKAGE}/docker/.dockerignore" "${PWD}/.dockerignore"
1515
fi
1616

17-
TAG="${DOCKER_IMAGE_TAG}"
17+
NGINX_TAG="${DOCKER_NGINX_TAG}"
18+
PHP_TAG="${DOCKER_PHP_TAG}"
1819

19-
if [[ -z "${TAG}" ]]; then
20-
echo "Environment variable [DOCKER_IMAGE_TAG] not found."
21-
exit 2
20+
if [[ -z "${NGINX_TAG}" ]]; then
21+
echo "Environment variable [DOCKER_NGINX_TAG] not found."
22+
exit 1
23+
fi
24+
25+
if [[ -z "${PHP_TAG}" ]]; then
26+
echo "Environment variable [DOCKER_PHP_TAG] not found."
27+
exit 1
2228
fi
2329

24-
echo "Building [${TAG}:nginx]"
30+
echo "Building [${NGINX_TAG}]"
2531
docker build \
26-
--tag "${TAG}:nginx" \
32+
--tag "${NGINX_TAG}" \
2733
--file "${PACKAGE}/docker/nginx.Dockerfile" \
2834
"${PWD}"
2935

30-
echo "Building [${TAG}:php]"
36+
echo "Building [${PHP_TAG}]"
3137
docker build \
32-
--tag "${TAG}:php" \
38+
--tag "${PHP_TAG}" \
3339
--file "${PACKAGE}/docker/php.Dockerfile" \
3440
"${PWD}"

0 commit comments

Comments
 (0)