Add docker files

This commit is contained in:
Tobias Reisinger 2024-05-03 14:19:08 +02:00
parent e2045d31d6
commit c3b185b592
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 43 additions and 0 deletions

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM rust:1 as builder
RUN rustup target add x86_64-unknown-linux-musl && \
apt update && \
apt install -y musl-tools musl-dev && \
update-ca-certificates
COPY ./ /emgauwa
WORKDIR /emgauwa
RUN cargo build --target x86_64-unknown-linux-musl --release
FROM scratch
COPY --from=builder /emgauwa/target/x86_64-unknown-linux-musl/release/emgauwa-controller /usr/bin/emgauwa-controller
CMD ["/usr/bin/emgauwa-controller"]