Add image without and with PHP Support
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Fabian Stamm 2022-02-19 20:38:36 +01:00
parent 28b05d69b2
commit 6ba1f99bbc
3 changed files with 30 additions and 30 deletions

View File

@ -3,7 +3,7 @@ type: docker
name: default name: default
steps: steps:
- name: Publish to docker - name: Publish Base to docker
image: plugins/docker image: plugins/docker
settings: settings:
username: username:
@ -19,3 +19,19 @@ steps:
event: event:
exclude: exclude:
- pull_request - pull_request
- name: Publish PHP to docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
auto_tag: true
repo: docker.hibas123.de/caddy-php
registry: docker.hibas123.de
debug: false
when:
branch: [master]
event:
exclude:
- pull_request

View File

@ -1,34 +1,10 @@
ARG version=2.4.5 FROM docker.io/alpine:3
FROM golang:1.16-alpine3.13 AS builder
ARG version
WORKDIR /src
RUN apk add --no-cache \
git \
ca-certificates
RUN go get -u github.com/caddyserver/xcaddy/cmd/xcaddy
ENV CADDY_VERSION="v${version}"
RUN xcaddy build --with github.com/caddy-dns/cloudflare --output /usr/bin/caddy
RUN /usr/bin/caddy version
FROM alpine:3
LABEL maintainer "Fabian Stamm <dev@fabianstamm.de>" LABEL maintainer "Fabian Stamm <dev@fabianstamm.de>"
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.9/community >> /etc/apk/repositories RUN apk add --no-cache curl
RUN apk add --no-cache openssl libxml2 php7 php7-fpm php7-opcache php7-curl php7-ctype php7-dom php7-gd php7-iconv \
php7-json php7-xml php7-mbstring php7-openssl php7-posix php7-session php7-simplexml php7-xmlreader php7-xmlwriter \
php7-zip php7-zlib php7-pdo_sqlite php7-pdo_mysql php7-pdo_pgsql php7-fileinfo php7-bz2 php7-intl php7-ldap \
php7-ftp php7-imap php7-bcmath php7-gmp php7-exif
RUN cat /etc/php7/php-fpm.d/www.conf | sed 's/listen = 127.0.0.1:9000/listen = \/run\/php-fpm.sock/g' > /etc/php7/php-fpm.d/www.conf
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
RUN curl -o /usr/bin/caddy "https://caddyserver.com/api/download?os=linux&arch=amd64&p=github.com%2Fcaddy-dns%2Fcloudflare&p=github.com%2FRussellLuo%2Fcaddy-ext%2Fratelimit&p=github.com%2Ftechknowlogick%2Fcertmagic-s3&idempotency=81742055656173"
RUN chmod +x /usr/bin/caddy
#Validate install #Validate install
RUN caddy version RUN caddy version
@ -36,7 +12,7 @@ RUN caddy list-modules
EXPOSE 80 443 2019 EXPOSE 80 443 2019
VOLUME [ "/data", "/config" ] VOLUME [ "/config" ]
WORKDIR /srv WORKDIR /srv

8
Dockerfile.php Normal file
View File

@ -0,0 +1,8 @@
FROM docker.hibas123.de/caddy
RUN apk add --no-cache openssl libxml2 php7 php7-fpm php7-opcache php7-curl php7-ctype php7-dom php7-gd php7-iconv \
php7-json php7-xml php7-mbstring php7-openssl php7-posix php7-session php7-simplexml php7-xmlreader php7-xmlwriter \
php7-zip php7-zlib php7-pdo_sqlite php7-pdo_mysql php7-pdo_pgsql php7-fileinfo php7-bz2 php7-intl php7-ldap \
php7-ftp php7-imap php7-bcmath php7-gmp php7-exif
RUN cat /etc/php7/php-fpm.d/www.conf | sed 's/listen = 127.0.0.1:9000/listen = \/run\/php-fpm.sock/g' > /etc/php7/php-fpm.d/www.conf