-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
45 lines (34 loc) · 1.07 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM --platform=linux/amd64 alpine:3.12 as builder
ARG VER=v1.5.3
ARG TARGETARCH
ARG ARCH
ENV PATH=$PATH:/opt
ENV TZ=Asia/Shanghai
COPY arch.sh /tmp/arch.sh
RUN apk --no-cache add bash tzdata \
&& mkdir -p /tmp/linux \
&& /tmp/arch.sh ${VER} \
&& mv /tmp/linux/* /opt/ \
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& cat /etc/timezone \
&& rm -rf /tmp/* \
&& apk del tzdata
FROM ubuntu:20.04
RUN groupadd -r chia && useradd -r -m -g chia chia
ENV PATH=$PATH:/opt
WORKDIR /opt
COPY --from=builder /etc/localtime /etc
COPY --from=builder /etc/timezone /etc
COPY --from=builder /opt/x-proxy-pp-linux-amd64 /opt/x-proxy
COPY --from=builder /opt/config.yaml /opt/config.yaml
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl gosu sqlite3 \
&& cd /opt/ \
&& curl -sOL https://github.com/krallin/tini/releases/download/v0.19.0/tini \
&& chmod +x tini \
&& ls -al /opt/
EXPOSE 9190
COPY docker-entrypoint.sh /opt/entrypoint.sh
ENTRYPOINT ["tini", "--", "entrypoint.sh"]
CMD ["x-proxy"]