Add build docker image workflow

This commit is contained in:
2023-10-16 00:45:23 +02:00
parent dc8606c887
commit 93ee7d0cd9
3 changed files with 78 additions and 0 deletions

21
docker/build.dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM rust:bullseye AS builder
WORKDIR /app
COPY . .
RUN cargo build --release --bin ionos-ddns
FROM debian:bullseye-slim
RUN apt-get update \
&& apt-get install -y openssl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN update-ca-certificates
WORKDIR /app
COPY --from=builder /app/target/release/ionos-ddns /usr/local/bin
ENTRYPOINT ["/usr/local/bin/ionos-ddns"]