From ad2002818723fb7fd1a10602c7c8c2e3aae9a9c8 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Wed, 28 Nov 2018 12:01:48 +0100 Subject: [PATCH] Initial Dockerfile --- .gitignore | 0 .gitlab-ci.yml | 10 ++++++++++ Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ README.md | 7 +++++++ 4 files changed, 54 insertions(+) create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..7046f31 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,10 @@ +before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + +build-master: + stage: build + script: + - docker build --pull -t $CI_REGISTRY_IMAGE . + - docker push $CI_REGISTRY_IMAGE + only: + - master diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0710aca --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +FROM docker:18.06.1 + +LABEL com.example.vendor="PARAGON Executive Service GmbH" \ + maintainer="juergen@paragon-es.de" \ + version="1.0.0" \ + description="An image for GitLab runner to build and test Drupal projects." + +ARG compose_version=1.21.2 + +RUN apk update && \ + apk add --no-cache curl openssl openssh ca-certificates wget make && \ + \ + wget -q https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -O /etc/apk/keys/sgerrand.rsa.pub && \ + wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk && \ + apk add --no-cache glibc-2.28-r0.apk && \ + rm glibc-2.28-r0.apk && \ + ln -s /lib/libz.so.1 /usr/glibc-compat/lib/ && \ + ln -s /lib/libc.musl-x86_64.so.1 /usr/glibc-compat/lib && \ + \ + apk add --no-cache bash python nodejs git unzip \ + php7 php7-phar php7-json php7-dom php7-gd php7-mbstring php7-openssl \ + php7-pdo php7-curl php7-xml php7-zip php7-session php7-ctype && \ + ln -s /usr/bin/php7 /usr/local/bin/php &&\ + \ + wget -q https://github.com/docker/compose/releases/download/${compose_version}/docker-compose-`uname -s`-`uname -m` -O /usr/local/bin/docker-compose && \ + chmod +x /usr/local/bin/docker-compose && \ + \ + wget -q https://getcomposer.org/composer.phar -O /usr/local/bin/composer && \ + chmod +x /usr/local/bin/composer && \ + composer selfupdate && \ + \ + git clone https://github.com/tj/git-extras.git && \ + cd git-extras && \ + git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) && \ + make install && \ + cd .. && \ + rm -rf git-extras diff --git a/README.md b/README.md index 8f04b05..0a5cdd3 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ # Usage + +TBD + +# Credit + +- [Image from jonaskello](https://github.com/jonaskello/docker-and-compose) +- [Alpine glibc from sgerrand](https://github.com/sgerrand/alpine-pkg-glibc) -- GitLab