Create Dockerfile
Browse files- Dockerfile +47 -0
Dockerfile
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04 AS builder
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
RUN apt-get update; \
|
| 6 |
+
apt-get install -y wget unzip; \
|
| 7 |
+
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip; \
|
| 8 |
+
unzip Xray-linux-64.zip; \
|
| 9 |
+
rm -f Xray-linux-64.zip; \
|
| 10 |
+
mv xray xy; \
|
| 11 |
+
wget -O td https://github.com/tsl0922/ttyd/releases/latest/download/ttyd.x86_64; \
|
| 12 |
+
chmod +x td; \
|
| 13 |
+
wget -O supercronic https://github.com/aptible/supercronic/releases/latest/download/supercronic-linux-amd64; \
|
| 14 |
+
chmod +x supercronic
|
| 15 |
+
|
| 16 |
+
############################################################
|
| 17 |
+
|
| 18 |
+
FROM ubuntu:22.04
|
| 19 |
+
|
| 20 |
+
LABEL org.opencontainers.image.source="https://github.com/vevc/one-node"
|
| 21 |
+
|
| 22 |
+
ENV TZ=Asia/Shanghai \
|
| 23 |
+
UUID=cb6df3f6-87e7-4df9-a425-a79d66336988 \
|
| 24 |
+
DOMAIN=nich2456-fml.hf.space
|
| 25 |
+
|
| 26 |
+
COPY entrypoint.sh /entrypoint.sh
|
| 27 |
+
COPY app /app
|
| 28 |
+
|
| 29 |
+
RUN export DEBIAN_FRONTEND=noninteractive; \
|
| 30 |
+
apt-get update; \
|
| 31 |
+
apt-get install -y tzdata openssh-server curl ca-certificates wget vim net-tools supervisor unzip iputils-ping telnet git iproute2 --no-install-recommends; \
|
| 32 |
+
apt-get clean; \
|
| 33 |
+
rm -rf /var/lib/apt/lists/*; \
|
| 34 |
+
chmod +x /entrypoint.sh; \
|
| 35 |
+
chmod -R 777 /app; \
|
| 36 |
+
useradd -u 1000 -g 0 -m -s /bin/bash user; \
|
| 37 |
+
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime; \
|
| 38 |
+
echo $TZ > /etc/timezone
|
| 39 |
+
|
| 40 |
+
COPY --from=builder /app/xy /usr/local/bin/xy
|
| 41 |
+
COPY --from=builder /app/td /usr/local/bin/td
|
| 42 |
+
COPY --from=builder /app/supercronic /usr/local/bin/supercronic
|
| 43 |
+
|
| 44 |
+
EXPOSE 7860
|
| 45 |
+
|
| 46 |
+
ENTRYPOINT ["/entrypoint.sh"]
|
| 47 |
+
CMD ["supervisord", "-c", "/app/supervisor/supervisord.conf"]
|