-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.j2
More file actions
55 lines (47 loc) · 1.76 KB
/
Containerfile.j2
File metadata and controls
55 lines (47 loc) · 1.76 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
54
55
ARG FREEBSD_RELEASE=15.0
FROM ghcr.io/freebsd/freebsd-runtime:${FREEBSD_RELEASE}
ARG FREEBSD_MAJOR=15
ARG PKG_BRANCH=quarterly
ARG PACKAGES="FreeBSD-utilities jq ca_root_nss"
ARG VERSION=""
LABEL org.opencontainers.image.title="{{ title }}" \
org.opencontainers.image.description="{{ description }}" \
org.opencontainers.image.source="{{ repo_url }}" \
org.opencontainers.image.url="{{ repo_url }}" \
org.opencontainers.image.licenses="{{ license }}" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.type="base" \
io.daemonless.category="{{ category }}" \
io.daemonless.packages="${PACKAGES}"
ENV ASSUME_ALWAYS_YES=yes
ENV PUID=1000
ENV PGID=1000
ENV TZ=UTC
COPY root/ /
RUN mkdir -p /etc/pkg && \
printf '%s\n' \
'FreeBSD-ports-kmods: { enabled: no }' \
'FreeBSD-base: {' \
' url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",' \
' mirror_type: "srv",' \
' signature_type: "fingerprints",' \
' fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",' \
' enabled: yes' \
'}' \
'FreeBSD-Ports: {' \
" url: \"pkg+https://pkg.FreeBSD.org/\${ABI}/${PKG_BRANCH}\"," \
' mirror_type: "srv",' \
' signature_type: "fingerprints",' \
' fingerprints: "/usr/share/keys/pkg",' \
' enabled: yes' \
'}' > /etc/pkg/FreeBSD.conf
RUN rm -rf /usr/local/etc/pkg/repos && \
pkg update && \
pkg install -y ${PACKAGES} && \
chmod 755 /usr/local/sbin && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
RUN pw groupadd -n bsd -g 1000 && \
pw useradd -n bsd -u 1000 -g bsd -d /config -s /bin/sh -c "Container User"
CMD ["tail", "-f", "/dev/null"]