summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-25 14:00:53 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-25 14:54:22 +0100
commitdaab59439f1362a92522e9549e1ba27a5ad4c95c (patch)
tree665c216f248f69ee2821b8f7fef310a3d89e0961 /Dockerfile
parent729fc25cf6ecf1123401a314151b25cfa3225659 (diff)
docker: dockerfile smaller
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile21
1 files changed, 3 insertions, 18 deletions
diff --git a/Dockerfile b/Dockerfile
index 1871dd5..fe3e044 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,25 +1,10 @@
# build stage
FROM rust:latest as cargo-build
-RUN apt-get update && apt-get install musl-tools libssl-dev build-essential -y
-RUN rustup target add x86_64-unknown-linux-musl
-
-WORKDIR /usr/src/app
+WORKDIR /usr/src/gico
COPY . .
-RUN RUSTFLAGS=-Clinker=musl-gcc cargo build --release --target=x86_64-unknown-linux-musl
-
-FROM alpine:latest
-
-RUN addgroup -g 1000 app
-RUN adduser -D -s /bin/sh -u 1000 -G app app
-
-WORKDIR /home/app/bin/
-COPY --from=cargo-build /usr/src/app/target/x86_64-unknown-linux-musl/release/gico .
-
-RUN chown app:app gico
-USER app
-
+RUN cargo install --path .
EXPOSE 9090
-CMD ["./gico"]
+CMD ["gico"]