-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 1.06 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
FROM alpine:latest
LABEL maintainer="Ivan Buetler <ivan.buetler@hacking-lab.com>"
# Adding s6-overlay
ENV S6_OVERLAY_VERSION=3.2.2.0
# Use BuildKit to help translate architecture names
ARG TARGETPLATFORM
RUN case "${TARGETPLATFORM}" in \
"linux/amd64") S6_ARCH=s6-overlay-x86_64.tar.xz ;; \
"linux/arm64") S6_ARCH=s6-overlay-aarch64.tar.xz ;; \
*) exit 1 ;; \
esac; \
echo "${TARGETPLATFORM} -> ${S6_ARCH}" > /etc/hl-arch.txt && \
apk add --update --no-cache bind-tools curl libcap bash net-tools openssl pwgen xz sudo busybox-suid vim file && \
apk upgrade --available && \
curl -sSL https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz | tar -Jxpf - -C / && \
curl -sSL https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/${S6_ARCH} | tar -Jxpf - -C / && \
rm -rf /var/cache/apk/*
ADD root /
# Adding s6 path to PATH
ENV PATH="/command:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ENTRYPOINT ["/init"]