aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2020-07-23 03:20:40 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2020-07-23 03:20:40 +0000
commit7f037da9c52495e4980b8fbe874f7030176eb93f (patch)
treeffcc35b57a22746109461ea50dc6165dcfe00534
parentFix and improve Docker build (diff)
downloadminiserve-7f037da9c52495e4980b8fbe874f7030176eb93f.tar.gz
miniserve-7f037da9c52495e4980b8fbe874f7030176eb93f.zip
Fix Alpine Docker build
-rw-r--r--Dockerfile2
-rw-r--r--Dockerfile.alpine5
2 files changed, 5 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 1e05498..6999f97 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,3 +1,5 @@
+# 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/
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 09d587c..1dcb023 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -1,11 +1,12 @@
# This Dockerfile results in an Alpine container containing the minishift executable.
# Use this in case you need additional basic tools provided by Alpine in this container.
-FROM rustlang/rust:nightly as builder
+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-get update && apt-get install -y upx musl-tools
+RUN apt update && apt-get install -y upx musl-tools
COPY . $APP_HOME
WORKDIR $APP_HOME