🏡 index : ~doyle/bin.git

author Olgierd "Allgreed" Kasprowicz <olixem@gmail.com> 2019-05-22 21:01:41.0 +02:00:00
committer Jordan Doyle <jordan@doyle.la> 2019-05-23 19:47:45.0 +01:00:00
commit
275ace8356c9623723762084b60c0b7938cb550d [patch]
tree
b80433f58d42ba1eedd5d8dc60a31a7996c41d6d
parent
41900eaeee670e84855f65d59c52543fd39beb51
download
275ace8356c9623723762084b60c0b7938cb550d.tar.gz

Add Dockerfile



Diff

 .dockerignore |  1 +
 Dockerfile    | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..eb5a316 100644
--- /dev/null
+++ a/.dockerignore
@@ -1,0 +1,1 @@
target
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..16f6bd0 100644
--- /dev/null
+++ a/Dockerfile
@@ -1,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"]