-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile.prod
31 lines (23 loc) · 883 Bytes
/
Dockerfile.prod
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
From debian:10
WORKDIR /opt
ARG APP=actixweb-sqlx-jwt
# # mirror and timezone fot china
# RUN set -eux; \
# sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list; \
# sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list; \
# ln -sfv /usr/share/zoneinfo/Hongkong /etc/localtime; \
# echo Hongkong > /etc/timezone;
RUN set -eux; \
apt-get update; \
apt-get install -y \
tzdata \
libssl-dev; \
apt-get clean; \
rm -rf /var/lib/apt
COPY ./target/release/${APP} /usr/local/bin/
ENV APP=${APP}
RUN $APP -V
CMD $APP -v
# docker build -t template-prod:latest -f Dockerfile.prod .
# docker run --rm -it --network host -v $PWD:/opt --name template template-prod actixweb-sqlx-jwt -V
# docker run -d --restart always --network host -v $PWD:/opt --name template template-prod