Commit a9b74b3d authored by Jürgen Haas's avatar Jürgen Haas
Browse files

l3d#46 Fix env variable PHP_VERSION

parent 5ce56b71
Pipeline #28313 passed with stage
in 2 minutes and 9 seconds
......@@ -7,7 +7,7 @@ before_script:
#php-7.0:
# stage: build
# script:
# - docker build --pull --build-arg ALPINE_VERSION=3.5 --build-arg PHP_VERSION=7.0 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.0 .
# - docker build --pull --build-arg ALPINE_VERSION=3.5 --build-arg PHP_MAJOR_VERSION=7.0 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.0 .
# - docker push $CI_REGISTRY_IMAGE:php-7.0
# only:
# - master
......@@ -15,7 +15,7 @@ before_script:
#php-7.1:
# stage: build
# script:
# - docker build --pull --build-arg ALPINE_VERSION=3.7 --build-arg PHP_VERSION=7.1 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.1 .
# - docker build --pull --build-arg ALPINE_VERSION=3.7 --build-arg PHP_MAJOR_VERSION=7.1 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.1 .
# - docker push $CI_REGISTRY_IMAGE:php-7.1
# only:
# - master
......@@ -23,7 +23,7 @@ before_script:
php-7.2:
stage: build
script:
- docker build --pull --build-arg ALPINE_VERSION=3.8 --build-arg PHP_VERSION=7.2 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.2 .
- docker build --pull --build-arg ALPINE_VERSION=3.8 --build-arg PHP_MAJOR_VERSION=7.2 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.2 .
- docker push $CI_REGISTRY_IMAGE:php-7.2
only:
- master
......@@ -31,7 +31,7 @@ php-7.2:
php-7.3:
stage: build
script:
- docker build --pull --build-arg ALPINE_VERSION=3.11 --build-arg PHP_VERSION=7.3 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.3 .
- docker build --pull --build-arg ALPINE_VERSION=3.11 --build-arg PHP_MAJOR_VERSION=7.3 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.3 .
- docker push $CI_REGISTRY_IMAGE:php-7.3
only:
- master
......@@ -39,7 +39,7 @@ php-7.3:
php-7.4:
stage: build
script:
- docker build --pull --build-arg ALPINE_VERSION=3.11 --build-arg PHP_VERSION=7.4 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.4 .
- docker build --pull --build-arg ALPINE_VERSION=3.11 --build-arg PHP_MAJOR_VERSION=7.4 --build-arg VERSION=${VERSION} -t $CI_REGISTRY_IMAGE:php-7.4 .
- docker push $CI_REGISTRY_IMAGE:php-7.4
only:
- master
v1.5.2 2020-10-16
-----------------
Fix env variable PHP_VERSION
v1.5.1 2020-10-15
-----------------
Add container for PHP 7.4
......
ARG ALPINE_VERSION
ARG PHP_VERSION
ARG PHP_MAJOR_VERSION
FROM php:${PHP_VERSION}-cli-alpine${ALPINE_VERSION}
FROM php:${PHP_MAJOR_VERSION}-cli-alpine${ALPINE_VERSION}
ARG VERSION
......@@ -11,7 +11,7 @@ LABEL com.example.vendor="LakeDrops" \
description="An image for GitLab runner to build and test Drupal projects."
ARG ALPINE_VERSION
ARG PHP_VERSION
ARG PHP_MAJOR_VERSION
ARG compose_version=1.25.1
ARG glibc_version=2.28-r0
ARG apkArch
......@@ -51,10 +51,10 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
\
apk update && \
apk add --no-cache mdocml-apropos openssh wget make patch bash fish python3 git git-lfs unzip acl libpng-dev libzip-dev && \
if [ "${PHP_VERSION}" = "7.3" ]; then \
if [ "${PHP_MAJOR_VERSION}" = "7.3" ]; then \
apk add --no-cache gnu-libiconv ; \
fi && \
if [ "${PHP_VERSION}" = "7.4" ]; then \
if [ "${PHP_MAJOR_VERSION}" = "7.4" ]; then \
apk add --no-cache gnu-libiconv ; \
fi && \
\
......@@ -107,6 +107,7 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
ADD bin/* /usr/local/bin/
ENV LAKEDROPS_DEV_DC_OPTIONS "-T"
ENV PHP_VERSION "${PHP_MAJOR_VERSION}"
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["sh"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment