Vastly optimise Docker image
This commit is contained in:
parent
24f6953863
commit
b71a7e04d9
14
Dockerfile
14
Dockerfile
@ -1,6 +1,14 @@
|
|||||||
FROM rust:bookworm
|
FROM alpine/git:latest as ircie
|
||||||
WORKDIR /app
|
WORKDIR /ircie
|
||||||
RUN git clone https://git.supernets.org/sad/ircie.git
|
RUN git clone https://git.supernets.org/sad/ircie.git
|
||||||
|
|
||||||
|
FROM rust:1-bookworm as builder
|
||||||
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
COPY --from=ircie /ircie/ /app/
|
||||||
RUN cargo build --release
|
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"]
|
@ -1,6 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
hardfight:
|
hardfight:
|
||||||
|
container_name: hardfight
|
||||||
image: git.supernets.org/hgw/hardfight:latest
|
image: git.supernets.org/hgw/hardfight:latest
|
||||||
#build: .
|
#build: .
|
||||||
volumes:
|
volumes:
|
||||||
- "$PWD/config/:/app/config/"
|
- "$PWD/config/:/hardfight/config/"
|
Loading…
Reference in New Issue
Block a user