blob: 6999f97ce69aad634c7fc8ffe7277d8c1c5b3f2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# This Dockerfile results in a super small container containing only the miniserve binary and nothing else.
# Use this in case you don't need any additional tools in the container.
FROM rust as builder
ENV APP_HOME /usr/src/app/
RUN rustup default nightly-2020-07-20
RUN rustup target add x86_64-unknown-linux-musl
RUN apt update && apt-get install -y upx musl-tools
COPY . $APP_HOME
WORKDIR $APP_HOME
RUN make build-linux
FROM scratch
COPY --from=builder /usr/src/app/target/x86_64-unknown-linux-musl/release/miniserve /app/
EXPOSE 8080
ENTRYPOINT ["/app/miniserve"]
|