-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
28 lines (18 loc) · 629 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
FROM clux/muslrust:nightly AS build
WORKDIR /build
COPY . .
RUN apt-get update && apt-get install -y ca-certificates
RUN cargo build --release
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-muslc-amd64 /tini
RUN chmod +x /tini
RUN mkdir /tmp_tmp
FROM scratch AS run
ENV PORT 8000
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /build/target/x86_64-unknown-linux-musl/release/retrograde /retrograde
COPY --from=build /tini /tini
COPY --from=build /tmp_tmp /tmp
EXPOSE $PORT
ENTRYPOINT ["/tini", "--"]
CMD ["/retrograde"]