diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-03-24 23:13:52 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-03-25 00:57:55 +0100 |
commit | 2793ae353771d1e9f88381b01493836164023f4d (patch) | |
tree | db28b46a4ff07ac5bcccfaa45bc4264c14c98242 /Dockerfile | |
parent | 35ea28801ed4473b5d74e24ddd3340abb1d12f57 (diff) |
docker: fix dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1,29 +1,25 @@ # build stage FROM rust:latest as cargo-build -RUN apt-get update && apt-get install musl-tools -y +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 COPY . . -RUN RUSTFLAGS=-Clinker=musl-gcc cargo build --release ---target=x86_64-unknown-linux-musl +RUN RUSTFLAGS=-Clinker=musl-gcc cargo build --release --target=x86_64-unknown-linux-musl -################### -# final stage 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-api . +COPY --from=cargo-build /usr/src/app/target/x86_64-unknown-linux-musl/release/gico . -RUN chown app:app gico-api +RUN chown app:app gico USER app EXPOSE 9090 -CMD ["./gico-api"] +CMD ["./gico"] |