forked from arloor/rust_http_proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.static
More file actions
22 lines (20 loc) · 776 Bytes
/
Dockerfile.static
File metadata and controls
22 lines (20 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# FROM alpine as builder
# RUN apk add --no-cache tzdata; \
# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
# echo "Asia/Shanghai" > /etc/timezone; \
# apk del tzdata
# FROM scratch
# COPY --from=builder /etc/timezone /etc/timezone
# COPY --from=builder /etc/localtime /etc/localtime
# ARG TARGET_PATH=/x86_64-unknown-linux-musl
# COPY target${TARGET_PATH}/release/rust_http_proxy /
# ENTRYPOINT ["/rust_http_proxy"]
FROM alpine:latest
RUN apk add --no-cache net-tools; \
apk add --no-cache tzdata; \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
echo "Asia/Shanghai" > /etc/timezone; \
apk del tzdata
ARG TARGET_PATH=/x86_64-unknown-linux-musl
COPY target${TARGET_PATH}/release/rust_http_proxy /
ENTRYPOINT ["/rust_http_proxy"]