-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathDockerfile.multiarch
More file actions
37 lines (29 loc) · 983 Bytes
/
Copy pathDockerfile.multiarch
File metadata and controls
37 lines (29 loc) · 983 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
30
31
32
33
34
35
36
37
FROM debian:trixie-slim
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3t64 \
&& rm -rf /var/lib/apt/lists/*
# Copy the appropriate binary based on the target platform
# Docker buildx provides TARGETPLATFORM in format like "linux/amd64", "linux/arm64", etc.
COPY zerofs-linux-* /tmp/
RUN case "${TARGETPLATFORM}" in \
"linux/amd64") \
mv /tmp/zerofs-linux-amd64-pgo /usr/local/bin/zerofs \
;; \
"linux/arm64") \
mv /tmp/zerofs-linux-arm64-pgo /usr/local/bin/zerofs \
;; \
*) \
echo "Unsupported platform: ${TARGETPLATFORM}" && exit 1 \
;; \
esac && \
rm -f /tmp/zerofs-linux-*-pgo && \
chmod +x /usr/local/bin/zerofs
RUN useradd -m -u 1001 zerofs
USER zerofs
# Default ports that might be used - actual configuration comes from TOML file
EXPOSE 2049 5564 10809
ENTRYPOINT ["zerofs"]