dockerfile: shaving off old bits; use rust stable now
Building multi-layered containers gave weird 500 errors. I think they were permission based but don't have the time to look into it. Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
parent
80c6809414
commit
cb8e210acb
19
Dockerfile
19
Dockerfile
|
@ -1,19 +1,16 @@
|
||||||
FROM rustlang/rust:nightly-slim AS builder
|
FROM rust:1 as builder
|
||||||
WORKDIR app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cargo build --release
|
|
||||||
|
|
||||||
FROM debian:buster-slim AS runtime
|
RUN cargo install --path .
|
||||||
WORKDIR app
|
RUN cargo clean
|
||||||
RUN apt-get update -y \
|
|
||||||
&& apt-get autoremove -y \
|
|
||||||
&& apt-get clean -y \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
COPY --from=builder /app/target/release/bin bin
|
|
||||||
RUN mkdir -p upload
|
RUN mkdir -p upload
|
||||||
COPY ./templates templates
|
COPY ./templates templates
|
||||||
|
COPY ./static static
|
||||||
|
|
||||||
ENV ROCKET_ADDRESS=0.0.0.0
|
ENV ROCKET_ADDRESS=0.0.0.0
|
||||||
ENV ROCKET_PORT=6162
|
ENV ROCKET_PORT=6162
|
||||||
|
|
||||||
ENTRYPOINT ["./bin"]
|
EXPOSE 6162
|
||||||
|
CMD ["bin"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user