Migrate the Dockerfile to Ubuntu

This commit is contained in:
Nikolai Rodionov 2023-02-12 20:13:42 +01:00
parent 86f00a4c9c
commit 6459152833

View File

@ -1,13 +1,16 @@
FROM rust:1.66.1-alpine3.17 as builder FROM rust:1.67.1-slim-buster as builder
WORKDIR /src WORKDIR /src
RUN apk update && apk add --no-cache libressl-dev musl-dev gcc RUN apt-get update &&\
apt-get install -y libssl-dev gcc musl pkg-config
COPY ./ . COPY ./ .
RUN cargo build --release RUN cargo build --release
FROM alpine:3.17.1 FROM debian:stable
COPY --from=builder /src/target/release/dudo /bin/dudo COPY --from=builder /src/target/release/dudo /bin/dudo
RUN apk update && apk add --no-cache libressl-dev libc6-compat RUN apt-get update &&\
apt-get install openssl ca-certificates &&\
apt-get clean
RUN chmod +x /bin/dudo RUN chmod +x /bin/dudo
WORKDIR /workdir WORKDIR /workdir
ENTRYPOINT ["/bin/dudo"] ENTRYPOINT ["/bin/dudo"]