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

Merge remote-tracking branch 'origin/master'

parents 73810530 4849f6d6
variables:
VERSION: ${CI_COMMIT_TAG}
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
php-7.0:
stage: build
script:
- docker build --pull --build-arg ALPINE_VERSION=3.5 --build-arg PHP_VERSION=7.0 -t $CI_REGISTRY_IMAGE:php-7.0 .
- docker push $CI_REGISTRY_IMAGE:php-7.0
only:
- master
#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 push $CI_REGISTRY_IMAGE:php-7.0
# only:
# - master
php-7.1:
#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 push $CI_REGISTRY_IMAGE:php-7.1
# only:
# - master
php-7.2:
stage: build
script:
- docker build --pull --build-arg ALPINE_VERSION=3.7 --build-arg PHP_VERSION=7.1 -t $CI_REGISTRY_IMAGE:php-7.1 .
- docker push $CI_REGISTRY_IMAGE:php-7.1
- 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 push $CI_REGISTRY_IMAGE:php-7.2
only:
- master
php-7.2:
php-7.3:
stage: build
script:
- docker build --pull --build-arg ALPINE_VERSION=3.8 --build-arg PHP_VERSION=7.2 -t $CI_REGISTRY_IMAGE:php-7.2 .
- docker push $CI_REGISTRY_IMAGE:php-7.2
- 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 push $CI_REGISTRY_IMAGE:php-7.3
only:
- master
v1.4.0 2020-01-12
-----------------
Add version to the images again
docker/l3d#4 Set permissions after "drush generate"
docker/l3d#39 Update to git-extras version 5.1.0 by hard-copying column as a binary
docker/l3d#34 Add support for PHP 7.3
docker/l3d#36 Add apropos which also brings man
docker/l3d#37 Add phpstan script which runs in its own docker container
docker/l3d#38 Update Docker to 19.03.5
docker/l3d#38 Update Docker Compose to 1.25.1
docker/l3d#40 Update to Python 3 No longer update image for PHP 7.0 and 7.1
FROM alpine:3.8
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION}
ARG VERSION
LABEL com.example.vendor="LakeDrops" \
maintainer="juergen.haas@lakedrops.com" \
version="1.5.2" \
version="${VERSION}" \
description="An image for GitLab runner to build and test Drupal projects."
ARG ALPINE_VERSION
ARG PHP_VERSION
ARG compose_version=1.21.2
ARG compose_version=1.25.1
ARG glibc_version=2.28-r0
ARG apkArch
ARG dockerArch
ARG DOCKER_CHANNEL=stable
ARG DOCKER_VERSION=18.06.1-ce
ARG DOCKER_VERSION=19.03.5
ARG GIT_EXTRAS_VERSION=5.1.0
ARG AHOY_VERSION=2.0.0
ADD usrbin/column /usr/bin/column
RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
set -eux && \
......@@ -41,7 +49,7 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
echo "StrictHostKeyChecking no" >> /root/.ssh/config && \
\
apk update && \
apk add --no-cache openssh wget make patch bash fish python git git-lfs unzip acl && \
apk add --no-cache mdocml-apropos openssh wget make patch bash fish python3 git git-lfs unzip acl && \
\
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/${glibc_version}/glibc-${glibc_version}.apk && \
......@@ -51,8 +59,10 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
ln -s /lib/libc.musl-x86_64.so.1 /usr/glibc-compat/lib && \
ln -s /usr/lib/libgcc_s.so.1 /lib/libgcc_s.so.1 && \
ln -s /lib/libgcc_s.so.1 /usr/glibc-compat/lib/ && \
ln -s python3 /usr/bin/python && \
ln -s pip3 /usr/bin/pip && \
\
wget -q https://github.com/ahoy-cli/ahoy/releases/download/2.0.0/ahoy-bin-`uname -s`-amd64 -O /usr/local/bin/ahoy && \
wget -q https://github.com/ahoy-cli/ahoy/releases/download/${AHOY_VERSION}/ahoy-bin-`uname -s`-amd64 -O /usr/local/bin/ahoy && \
chmod +x /usr/local/bin/ahoy && \
\
wget -q https://github.com/docker/compose/releases/download/${compose_version}/docker-compose-`uname -s`-`uname -m` -O /usr/local/bin/docker-compose && \
......@@ -63,8 +73,7 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
\
git clone https://github.com/tj/git-extras.git && \
cd git-extras && \
#git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) && \
git checkout 4.7.0 && \
git checkout ${GIT_EXTRAS_VERSION} && \
make install && \
cd .. && \
rm -rf git-extras && \
......@@ -85,6 +94,9 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
if [ "${PHP_VERSION}" = "7.2" ]; then \
apk add --no-cache php7-sodium ; \
fi && \
if [ "${PHP_VERSION}" = "7.3" ]; then \
apk add --no-cache php7-sodium ; \
fi && \
rm /etc/apk/repositories && \
mv /etc/apk/repositories.org /etc/apk/repositories && \
apk update && \
......
#!/bin/sh
function setPermissions {
chmod -R g+w .
}
docker-compose exec ${LAKEDROPS_DEV_DC_OPTIONS} --user root php drush $@
if [[ "$1" == "gen" ]]; then
setPermissions
fi
if [[ "$1" == "generate" ]]; then
setPermissions
fi
#!/bin/bash
export $(cat .env | xargs)
docker run --rm -v $(php /usr/local/bin/volume.php /app) phpstan/phpstan "$@"
......@@ -16,15 +16,17 @@ function readContainerConfig() {
return [];
}
function getDockerMountSource() {
function getDockerMountSource($args) {
$currentDir = getcwd();
$destDir = (empty($args[1])) ? $currentDir : $args[1];
$container = readContainerConfig();
foreach ($container['Mounts'] as $mount) {
if (strpos($currentDir, $mount['Destination']) === 0) {
return $mount['Source'] . ':' . $mount['Destination'];
return $mount['Source'] . ':' . (empty($args[1]) ? $mount['Destination'] : $destDir);
}
}
return $currentDir . ':' . $currentDir;
return $currentDir . ':' . $destDir;
}
print(getDockerMountSource());
print(getDockerMountSource($argv));
File added
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