forked from cookieY/Yearning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (21 loc) · 932 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
31
32
ARG BASEIMAGES=3.15
FROM alpine:${BASEIMAGES} AS builder
LABEL maintainer="chaiyd <chaiyd.cn@gmail.com>"
ARG YEARNING_VER=3.0.0-rc11
ARG YEARNING_URL=https://github.com/cookieY/Yearning/releases/download/${YEARNING_VER}/Yearning-${YEARNING_VER}-linux-amd64.zip
RUN wget -cO yearning.zip $YEARNING_URL && \
unzip yearning.zip && \
mv Yearning/* /opt
FROM alpine:${BASEIMAGES}
LABEL maintainer="chaiyd <chaiyd.cn@gmail.com>"
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache ca-certificates bash tree tzdata libc6-compat dumb-init \
&& cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
COPY --from=builder /opt/Yearning /opt/Yearning
COPY --from=builder /opt/conf.toml /opt/conf.toml
WORKDIR /opt/
EXPOSE 8000
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/opt/Yearning", "run"]