Merge pull request #369 from nextcloud/enh/345/get-caddy-apcu-correctly

get caddy and apcu correctly
This commit is contained in:
Simon L 2022-03-14 16:43:21 +01:00 committed by GitHub
commit 20bf2cfa7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 11 deletions

View file

@ -31,6 +31,18 @@ jobs:
done
echo "outdated dependencies:
$(composer outdated)"
- name: Update apcu
run: |
# APCU
apcu_version="$(
git ls-remote --tags https://github.com/krakjoe/apcu.git \
| cut -d/ -f3 \
| grep -vE -- '-rc|-b' \
| sed -E 's/^v//' \
| sort -V \
| tail -1
)"
sed -i "s|pecl install APCu.*\;|pecl install APCu-$apcu_version\;|" ./Containers/mastercontainer/Dockerfile
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:

View file

@ -1,3 +1,6 @@
# Caddy is a requirement
FROM caddy:2.4.6-alpine as caddy
FROM debian:bullseye-20220228-slim
EXPOSE 80
@ -21,10 +24,8 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
RUN set -ex; \
wget "https://caddyserver.com/api/download?os=linux&arch=$(dpkg-architecture --query DEB_BUILD_ARCH)" -O "/usr/bin/caddy" \
&& chmod +x /usr/bin/caddy \
&& /usr/bin/caddy version
COPY --from=caddy /usr/bin/caddy /usr/bin/
RUN chmod +x /usr/bin/caddy
RUN a2enmod rewrite \
headers \

View file

@ -1,6 +1,9 @@
# Docker CLI is a requirement
FROM docker:20.10.13-dind-alpine3.15 as dind
# Caddy is a requirement
FROM caddy:2.4.6-alpine as caddy
# From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile
FROM php:8.0.16-apache-bullseye
@ -26,17 +29,15 @@ RUN apt-get update; \
; \
rm -rf /var/lib/apt/lists/*
RUN set -ex; \
curl "https://caddyserver.com/api/download?os=linux&arch=$(dpkg-architecture --query DEB_BUILD_ARCH)" -o "/usr/bin/caddy" \
&& chmod +x /usr/bin/caddy \
&& /usr/bin/caddy version
COPY --from=caddy /usr/bin/caddy /usr/bin/
RUN chmod +x /usr/bin/caddy
COPY --from=dind /usr/local/bin/docker /usr/local/bin/
RUN chmod +x /usr/local/bin/docker
RUN mkdir -p /usr/src/php/ext/apcu && \
curl -fsSL https://pecl.php.net/get/apcu | tar xvz -C "/usr/src/php/ext/apcu" --strip 1 && \
docker-php-ext-install apcu
RUN set -ex; \
pecl install APCu-5.1.21; \
docker-php-ext-enable apcu
RUN set -e && \
curl -sS https://getcomposer.org/installer | php && \