Vastly optimise Docker image

This commit is contained in:
hgw 2023-10-10 11:05:10 +00:00
parent 24f6953863
commit b71a7e04d9
Signed by: hgw
SSH Key Fingerprint: SHA256:diG7RVYHjd3aDYkZWHYcBJbImu+6zfptuUP+3k/wol4
2 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,14 @@
FROM rust:bookworm
WORKDIR /app
FROM alpine/git:latest as ircie
WORKDIR /ircie
RUN git clone https://git.supernets.org/sad/ircie.git
FROM rust:1-bookworm as builder
WORKDIR /app
COPY . .
COPY --from=ircie /ircie/ /app/
RUN cargo build --release
CMD ["./target/release/hardfight"]
FROM rust:1-bookworm as app
WORKDIR /hardfight
COPY --from=builder /app/target/release/hardfight .
CMD ["./hardfight"]

View File

@ -1,6 +1,7 @@
services:
hardfight:
container_name: hardfight
image: git.supernets.org/hgw/hardfight:latest
#build: .
volumes:
- "$PWD/config/:/app/config/"
- "$PWD/config/:/hardfight/config/"