-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (26 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
32 lines (26 loc) · 1.08 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
# =============================================================================
# Initialize keyring
# =============================================================================
# Must depend on Arch Linux
FROM archlinux:base AS initialize
# We only have to initialize the keyring and user
RUN pacman-key --init && \
groupadd archbyte && \
useradd -g archbyte archbyte
ADD ./recursedeps.sh /usr/local/bin/
# =============================================================================
# Download then serve packages
# =============================================================================
# Must depend on previous preparation (updates)
FROM initialize AS serve
# Update the system, install pactree (must be used to enumerate base packages)
# and then install the packages.txt listing
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm darkhttpd pacman-contrib && \
/usr/local/bin/recursedeps.sh && \
chown -R archbyte:archbyte /srv/archbyte
# Drop privileges
USER archbyte
# Serve
ENTRYPOINT [ "/usr/bin/darkhttpd", "/srv/archbyte" ]
CMD [ "--port", "8080" ]