-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (25 loc) · 894 Bytes
/
Dockerfile
File metadata and controls
29 lines (25 loc) · 894 Bytes
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
FROM ubuntu:latest
# Set default architecture to amd64 for local builds
ARG TARGETARCH=amd64
# Install dependencies, download architecture-specific cloudflared, and clean up in one layer
RUN set -eu; \
arch="$TARGETARCH"; \
case "$arch" in \
amd64|arm64) ;; \
*) echo "Unsupported architecture: $arch" >&2; exit 1 ;; \
esac; \
apt update && apt install -y \
bash \
curl \
wget \
coreutils \
&& rm -rf /var/lib/apt/lists/* \
&& wget -O /usr/local/bin/cloudflared \
"https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-$arch" \
&& chmod +x /usr/local/bin/cloudflared \
&& cloudflared --version
# Add r2-downloader
COPY mlc-r2-downloader.sh /usr/local/bin/r2-downloader
RUN chmod +x /usr/local/bin/r2-downloader
# Set working directory where files will be downloaded
WORKDIR /download