-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.pkg
More file actions
53 lines (43 loc) · 1.86 KB
/
Copy pathContainerfile.pkg
File metadata and controls
53 lines (43 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.pkg.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15.1
FROM ghcr.io/daemonless/base:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PKG_NAME="caddy"
ARG PACKAGES="caddy ca_root_nss"
LABEL org.opencontainers.image.title="Caddy" \
org.opencontainers.image.description="Fast, multi-platform web server and reverse proxy with automatic HTTPS, written in Go." \
org.opencontainers.image.source="https://github.com/daemonless/caddy" \
org.opencontainers.image.url="https://caddyserver.com" \
org.opencontainers.image.documentation="https://caddyserver.com/docs/" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Network" \
io.daemonless.port="80" \
io.daemonless.volumes="/config,/data" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.pkg-source="pkg" \
io.daemonless.packages="${PACKAGES}" \
io.daemonless.pkg-name="${PKG_NAME}"
# Install from FreeBSD packages
RUN pkg update && \
pkg install -y ${PACKAGES} && \
mkdir -p /app && \
pkg query '%v' ${PKG_NAME} > /app/version && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Create directories (certs/ACME state land in /data)
RUN mkdir -p /config /data && \
chown -R bsd:bsd /config /data
COPY root/ /
RUN chmod +x /etc/services.d/caddy/run /etc/cont-init.d/* 2>/dev/null || true
RUN mkdir -p /run/s6/services/caddy && \
ln -sf /etc/services.d/caddy/run /run/s6/services/caddy/run
# Expose (443/udp = HTTP/3; 2019 = admin API, localhost only)
EXPOSE 80 443 2019
# Volumes
VOLUME /config /data