-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 1.01 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
FROM debian:bookworm-slim
LABEL maintainer="Manuel Martinez <[email protected]>"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates \
wget \
&& ARCH=$(uname -m) \
&& if [ "$ARCH" = "x86_64" ]; then \
wget -O /tmp/cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb; \
elif [ "$ARCH" = "aarch64" ]; then \
wget -O /tmp/cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi \
&& dpkg -i /tmp/cloudflared.deb \
&& rm /tmp/cloudflared.deb \
&& rm -rf /var/lib/apt/lists/* \
&& adduser --disabled-password --home /home/container container
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
CMD ["/entrypoint.sh"]