-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (31 loc) · 1.22 KB
/
Dockerfile
File metadata and controls
37 lines (31 loc) · 1.22 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
32
33
34
35
36
37
# SPDX-FileCopyrightText: 2023-2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
FROM python:3.12-slim-bookworm
RUN \
apt-get update && \
apt-get install -y curl procps && \
apt-get autoclean
# Download and install FRP client into /usr/local/bin.
RUN set -ex; \
ARCH=$(uname -m); \
if [ "$ARCH" = "aarch64" ]; then \
FRP_URL="https://raw.githubusercontent.com/nextcloud/HaRP/main/exapps_dev/frp_0.61.1_linux_arm64.tar.gz"; \
else \
FRP_URL="https://raw.githubusercontent.com/nextcloud/HaRP/main/exapps_dev/frp_0.61.1_linux_amd64.tar.gz"; \
fi; \
echo "Downloading FRP client from $FRP_URL"; \
curl -L "$FRP_URL" -o /tmp/frp.tar.gz; \
tar -C /tmp -xzf /tmp/frp.tar.gz; \
mv /tmp/frp_0.61.1_linux_* /tmp/frp; \
cp /tmp/frp/frpc /usr/local/bin/frpc; \
chmod +x /usr/local/bin/frpc; \
rm -rf /tmp/frp /tmp/frp.tar.gz
COPY requirements.txt /
COPY --chmod=775 healthcheck.sh /
COPY --chmod=775 start.sh /
ADD /src/ /app/
RUN \
python3 -m pip install -r requirements.txt && rm -rf ~/.cache && rm requirements.txt
WORKDIR /app
ENTRYPOINT ["/start.sh", "python3", "main.py"]
HEALTHCHECK --interval=5s --timeout=2s --retries=300 CMD /healthcheck.sh