Add Dockerfile
This commit is contained in:
parent
41900eaeee
commit
275ace8356
2 changed files with 16 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
target
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM rust:1.34.2-slim-stretch AS builder
|
||||
RUN rustup install nightly-x86_64-unknown-linux-gnu
|
||||
|
||||
COPY . /sources
|
||||
WORKDIR /sources
|
||||
RUN cargo +nightly build --release
|
||||
RUN chown nobody:nogroup /sources/target/release/bin
|
||||
|
||||
|
||||
FROM debian:stretch-slim
|
||||
COPY --from=builder /sources/target/release/bin /pastebin
|
||||
|
||||
USER nobody
|
||||
EXPOSE 8000
|
||||
ENTRYPOINT ["/pastebin"]
|
Loading…
Add table
Add a link
Reference in a new issue