🏡 index : ~doyle/bin.git

author Olgierd "Allgreed" Kasprowicz <olixem@gmail.com> 2019-05-22 19:01:41.0 +00:00:00
committer Jordan Doyle <jordan@doyle.la> 2019-05-23 18:47:45.0 +00: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
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
target
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..16f6bd0
--- /dev/null
+++ b/Dockerfile
@@ -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"]