mirror of
https://github.com/casjaysdevdocker/caddy
synced 2025-01-18 18:34:27 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
db7c8441d5
commit
3fb5cd4215
12
Dockerfile
12
Dockerfile
@ -16,29 +16,27 @@ ARG IMAGE_VERSION="edge"
|
|||||||
ARG CONTAINER_VERSION="${IMAGE_VERSION}"
|
ARG CONTAINER_VERSION="${IMAGE_VERSION}"
|
||||||
|
|
||||||
ARG SERVICE_PORT="80"
|
ARG SERVICE_PORT="80"
|
||||||
ARG EXPOSE_PORTS="80"
|
ARG EXPOSE_PORTS="80 2019"
|
||||||
ARG PHP_VERSION="php8"
|
ARG PHP_VERSION="php8"
|
||||||
|
|
||||||
ARG USER="root"
|
ARG USER="root"
|
||||||
ARG DISTRO_VERSION="${IMAGE_VERSION}"
|
ARG DISTRO_VERSION="${IMAGE_VERSION}"
|
||||||
ARG BUILD_VERSION="${DISTRO_VERSION}"
|
ARG BUILD_VERSION="${DISTRO_VERSION}"
|
||||||
|
|
||||||
FROM golang:1.19-alpine AS caddy
|
FROM golang:latest AS caddy
|
||||||
ENV XDG_CONFIG_HOME /config
|
ENV XDG_CONFIG_HOME /config
|
||||||
ENV XDG_DATA_HOME /data
|
ENV XDG_DATA_HOME /data
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
apk -U upgrade && apk add jq curl --no-cache ; \
|
apk -U upgrade && apk add --no-cache jq curl libcap ; \
|
||||||
export version=$(curl -q -LSsf "https://api.github.com/repos/caddyserver/caddy/releases/latest" | jq -r .tag_name | grep '^'); \
|
export version=$(curl -q -LSsf "https://api.github.com/repos/caddyserver/caddy/releases/latest" | jq -r .tag_name | grep '^'); \
|
||||||
echo ">>>>>>>>>>>>>>> ${version} ###############" ; \
|
echo ">>>>>>>>>>>>>>> ${version} ###############" ; \
|
||||||
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest || exit 10; \
|
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest || exit 10; \
|
||||||
export XCADDY_SETCAP=1; xcaddy build ${version} \
|
export XCADDY_SETCAP=1; xcaddy build ${version} \
|
||||||
--output /usr/local/bin/caddy \
|
--output /usr/local/bin/caddy \
|
||||||
--with github.com/caddy-dns/rfc2136 \
|
--with github.com/caddy-dns/rfc2136 \
|
||||||
--with github.com/caddy-dns/route53 \
|
|
||||||
--with github.com/caddy-dns/cloudflare \
|
--with github.com/caddy-dns/cloudflare \
|
||||||
--with github.com/caddyserver/replace-response \
|
--with github.com/caddyserver/nginx-adapter \
|
||||||
--with github.com/porech/caddy-maxmind-geolocation \
|
|
||||||
--with github.com/hairyhenderson/caddy-teapot-module
|
--with github.com/hairyhenderson/caddy-teapot-module
|
||||||
|
|
||||||
FROM tianon/gosu:latest AS gosu
|
FROM tianon/gosu:latest AS gosu
|
||||||
@ -62,7 +60,7 @@ ARG DISTRO_VERSION
|
|||||||
ARG PHP_VERSION
|
ARG PHP_VERSION
|
||||||
|
|
||||||
ARG PACK_LIST="bash bash-completion git curl wget sudo iproute2 ssmtp openssl jq ca-certificates tzdata mailcap ncurses util-linux pciutils usbutils coreutils binutils findutils grep rsync zip certbot tini certbot py3-pip procps net-tools coreutils sed gawk grep attr findutils readline lsof less curl unzip \
|
ARG PACK_LIST="bash bash-completion git curl wget sudo iproute2 ssmtp openssl jq ca-certificates tzdata mailcap ncurses util-linux pciutils usbutils coreutils binutils findutils grep rsync zip certbot tini certbot py3-pip procps net-tools coreutils sed gawk grep attr findutils readline lsof less curl unzip \
|
||||||
jq composer ${PHP_VERSION}-apache2 ${PHP_VERSION}-bcmath ${PHP_VERSION}-bz2 ${PHP_VERSION}-calendar ${PHP_VERSION}-cgi \
|
jq composer ${PHP_VERSION}-bcmath ${PHP_VERSION}-bz2 ${PHP_VERSION}-calendar ${PHP_VERSION}-cgi \
|
||||||
${PHP_VERSION}-common ${PHP_VERSION}-ctype ${PHP_VERSION}-curl ${PHP_VERSION}-dba ${PHP_VERSION}-dev \
|
${PHP_VERSION}-common ${PHP_VERSION}-ctype ${PHP_VERSION}-curl ${PHP_VERSION}-dba ${PHP_VERSION}-dev \
|
||||||
${PHP_VERSION}-dom ${PHP_VERSION}-embed ${PHP_VERSION}-enchant ${PHP_VERSION}-exif ${PHP_VERSION}-ffi \
|
${PHP_VERSION}-dom ${PHP_VERSION}-embed ${PHP_VERSION}-enchant ${PHP_VERSION}-exif ${PHP_VERSION}-ffi \
|
||||||
${PHP_VERSION}-fileinfo ${PHP_VERSION}-fpm ${PHP_VERSION}-ftp ${PHP_VERSION}-gd ${PHP_VERSION}-gettext \
|
${PHP_VERSION}-fileinfo ${PHP_VERSION}-fpm ${PHP_VERSION}-ftp ${PHP_VERSION}-gd ${PHP_VERSION}-gettext \
|
||||||
|
@ -23,13 +23,13 @@ done
|
|||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# execute command variables
|
# execute command variables
|
||||||
WORKDIR="" # set working directory
|
WORKDIR="" # set working directory
|
||||||
SERVICE_UID="0" # set the user id
|
SERVICE_UID="0" # set the user id
|
||||||
SERVICE_USER="root" # execute command as another user
|
SERVICE_USER="root" # execute command as another user
|
||||||
SERVICE_PORT="" # port which service is listening on
|
SERVICE_PORT="" # port which service is listening on
|
||||||
EXEC_CMD_BIN="caddy" # command to execute
|
EXEC_CMD_BIN="caddy" # command to execute
|
||||||
EXEC_CMD_ARGS="run --config /etc/caddy/Caddyfile" # command arguments
|
EXEC_CMD_ARGS="run --config /etc/caddy/Caddyfile --adapter caddyfile" # command arguments
|
||||||
PRE_EXEC_MESSAGE="" # Show message before execute
|
PRE_EXEC_MESSAGE="" # Show message before execute
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Other variables that are needed
|
# Other variables that are needed
|
||||||
etc_dir="/etc/caddy"
|
etc_dir="/etc/caddy"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user