diff --git a/Dockerfile b/Dockerfile index 09ebc78..b191b1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,4 @@ -FROM golang:1.19-alpine AS caddy -ENV XDG_CONFIG_HOME /config -ENV XDG_DATA_HOME /data - -RUN set -ex \ - export XCADDY_SETCAP=1; \ - export version=$(curl -q -LSsf "https://api.github.com/repos/caddyserver/caddy/releases/latest" | jq -r .tag_name | grep '^' || exit 5); \ - echo ">>>>>>>>>>>>>>> ${version} ###############" - -RUN apk -U upgrade && \ - apk add jq --no-cache && \ - go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest || exit 10; \ - xcaddy build ${version} \ - --output /caddy \ - --with github.com/caddy-dns/route53 \ - --with github.com/caddy-dns/cloudflare \ - --with github.com/caddy-dns/alidns \ - --with github.com/caddy-dns/dnspod \ - --with github.com/caddy-dns/rfc2136 \ - --with github.com/hairyhenderson/caddy-teapot-module \ - --with github.com/kirsch33/realip \ - --with github.com/porech/caddy-maxmind-geolocation \ - --with github.com/caddyserver/transform-encoder \ - --with github.com/caddyserver/replace-response - -FROM casjaysdevdocker/php:latest as build +FROM casjaysdevdocker/alpine:latest AS build ARG ALPINE_VERSION="v3.16" @@ -33,7 +8,7 @@ ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" \ ARG PACK_LIST="bash" -ENV LANG=en_US.utf8 \ +ENV LANG=en_US.UTF-8 \ ENV=ENV=~/.bashrc \ TZ="America/New_York" \ SHELL="/bin/sh" \ @@ -42,7 +17,6 @@ ENV LANG=en_US.utf8 \ HOSTNAME="casjaysdev-caddy" COPY ./rootfs/. / -COPY --from=caddy /caddy /usr/bin/caddy RUN set -ex; \ rm -Rf "/etc/apk/repositories"; \ @@ -69,14 +43,14 @@ FROM scratch ARG \ SERVICE_PORT="80" \ - EXPOSE_PORTS="80 2019" \ + EXPOSE_PORTS="80" \ PHP_SERVER="caddy" \ NODE_VERSION="system" \ NODE_MANAGER="system" \ BUILD_VERSION="latest" \ LICENSE="MIT" \ IMAGE_NAME="caddy" \ - BUILD_DATE="Thu Oct 20 03:58:44 PM EDT 2022" \ + BUILD_DATE="Sun Nov 13 12:15:57 PM EST 2022" \ TIMEZONE="America/New_York" LABEL maintainer="CasjaysDev " \ @@ -94,9 +68,10 @@ LABEL maintainer="CasjaysDev " \ org.opencontainers.image.vcs-url="https://github.com/casjaysdevdocker/${IMAGE_NAME}" \ org.opencontainers.image.url.source="https://github.com/casjaysdevdocker/${IMAGE_NAME}" \ org.opencontainers.image.documentation="https://hub.docker.com/r/casjaysdevdocker/${IMAGE_NAME}" \ - org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}" + org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}" \ + com.github.containers.toolbox="false" -ENV LANG=en_US.utf8 \ +ENV LANG=en_US.UTF-8 \ ENV=~/.bashrc \ SHELL="/bin/bash" \ PORT="${SERVICE_PORT}" \ @@ -119,3 +94,4 @@ EXPOSE $EXPOSE_PORTS #CMD [ "" ] ENTRYPOINT [ "tini", "-p", "SIGTERM", "--", "/usr/local/bin/entrypoint.sh" ] HEALTHCHECK --start-period=1m --interval=2m --timeout=3s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ] +