forked from AssetsArt/easy-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (32 loc) · 809 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
33
34
35
36
# syntax=docker/dockerfile:1
# build stage
FROM ghcr.io/rust-lang/rust:nightly-slim AS builder
ENV DEBIAN_FRONTEND noninteractive
# install for build
RUN set -eux; \
apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
g++ \
cmake \
libssl-dev \
make \
pkg-config
WORKDIR /app
# copy app src
COPY . .
# build app
RUN cargo build --release
# create release image
FROM debian:latest
RUN apt-get update && apt-get install -y ca-certificates tzdata
RUN cp /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV TZ=Asia/Bangkok
WORKDIR /app
# copy app release
COPY --from=builder /app/target/release/easy-proxy ./easy-proxy
COPY .config .config
# default run entrypoint
CMD ["./easy-proxy"]