diff --git a/Dockerfile b/Dockerfile index d24ae02a..2b868876 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,15 @@ FROM $BASE_IMAGE AS builder # variables ARG APP_DIR +ARG USE_NGINX ARG VARIANT +# validate build arguments +RUN if [ "$VARIANT" == "development" ] && [ "$USE_NGINX" == "true" ]; then \ + >&2 echo "ERROR: No nginx server allowed in 'development' image!"; \ + exit 1; \ + fi + # install dependencies RUN apk add --no-cache \ git \