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 done
echo "outdated dependencies: echo "outdated dependencies:
$(composer outdated)" $(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 - name: Create Pull Request
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v3
with: with:

View file

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

View file

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