From e3087514ea6dc23074b01cbae23d962ec25a42e7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 2 Feb 2018 21:14:10 +1100 Subject: [PATCH] Updated to 4.9.2-fpm --- .gitlab-ci.yml | 8 ++++---- Dockerfile | 13 ++++++++----- start | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a319ba..3f30368 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,16 +7,15 @@ stages: variables: VERSION: 4.9.1-fpm CACHETAG: build - DOCKER_REGISTRY: registry.leenooks.net - DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375 + DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375 services: -- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind +- ${CI_REGISTRY}/leenooks/ci-docker:dind before_script: - docker info - docker version -- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} +- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin test: stage: test @@ -31,6 +30,7 @@ test: build: stage: build script: + - if [ -f init ]; then chmod 500 init; fi - docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker push ${CI_REGISTRY_IMAGE}:${VERSION} diff --git a/Dockerfile b/Dockerfile index 776bbbd..738c2ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,17 @@ # NAME leenooks/wordpress -# VERSION 4.9.1-fpm +# VERSION 4.9.2-fpm -FROM wordpress:4.9.1-fpm +FROM wordpress:4.9.2-fpm -RUN apt-get update && apt-get install -y openssh-server && useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp -EXPOSE 9000/tcp 22/tcp +RUN apt-get update \ + && apt-get install -y openssh-server \ + && useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp COPY sshd_config.patch /tmp RUN (cd / && patch -p0 ) < /tmp/sshd_config.patch && rm /tmp/sshd_config.patch +EXPOSE 9000/tcp 22/tcp + COPY start /usr/local/sbin ENTRYPOINT [ "/usr/local/sbin/start" ] -CMD ["php-fpm"] +CMD [ "php-fpm" ] diff --git a/start b/start index 2b2c214..e2c18de 100755 --- a/start +++ b/start @@ -5,4 +5,4 @@ if [ -x /usr/sbin/sshd -a "${SSH_START}" = "TRUE" ]; then start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22 fi -exec /usr/local/bin/docker-php-entrypoint "$@" +exec /usr/local/bin/docker-entrypoint.sh "$@"