-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (24 loc) · 1013 Bytes
/
Dockerfile
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
FROM alpine
# Update and Upgrade automatically without prompt
RUN apk update && apk upgrade
RUN apk add --no-cache ca-certificates dbus wget
# Delete cache and temp files to reduce image size
RUN rm -rf /var/cache/apk/* /tmp/*
# Define the download URL base
ARG DOWNLOAD_URL=https://api.speedshare.app/download/linux/cli
# Determine the architecture and download the correct SpeedShareCLI binary eg "x86_64" or
ARG ARCH
RUN if [ "$(uname -m)" = "x86_64" ] || [ "$TARGETARCH" = "amd64" ]; then \
ARCH="amd64"; \
elif [ "$(uname -m)" = "aarch64" ] || [ "$TARGETARCH" = "arm64" ]; then \
ARCH="arm64"; \
else \
echo "Unsupported architecture: $(uname -m)" && exit 1; \
fi && \
echo "Downloading SpeedShareCLI for ${ARCH}" && \
wget -q "${DOWNLOAD_URL}/${ARCH}" -O /usr/local/bin/SpeedShareCLI && \
chmod +x /usr/local/bin/SpeedShareCLI
# Add the entrypoint script
ADD entrypoint.sh /root/
RUN chmod +x /root/entrypoint.sh
ENTRYPOINT [ "/root/entrypoint.sh" ]