Trying to pass environment variable automatically

This commit is contained in:
William Miceli
2019-05-03 21:05:09 -04:00
parent 4551c364f2
commit e99686a242
2 changed files with 3 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ build-base:
- docker info - docker info
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin
script: script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:$GRAV_VERSION" . - docker build --pull --build-arg "GRAV_VERSION=$GRAV_VERSION" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:$GRAV_VERSION" .
- docker push "$CI_REGISTRY_IMAGE:$GRAV_VERSION" - docker push "$CI_REGISTRY_IMAGE:$GRAV_VERSION"
build-git: build-git:

View File

@@ -1,6 +1,8 @@
FROM nginx:1.15.10-alpine FROM nginx:1.15.10-alpine
USER root USER root
ARG GRAV_VERSION
# Install PHP And Modules Needed For Grav, With Optional Modules To Help With Performance # Install PHP And Modules Needed For Grav, With Optional Modules To Help With Performance
RUN apk add --no-cache \ RUN apk add --no-cache \
php7 \ php7 \