workspace/Dockerfile

23 lines
785 B
Text
Raw Normal View History

2024-12-26 01:49:11 +00:00
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
FROM builder as builder-core
WORKDIR /emgauwa/core
RUN cargo build --target x86_64-unknown-linux-musl --release
FROM builder as builder-controller
WORKDIR /emgauwa/controller
RUN cargo build --target x86_64-unknown-linux-musl --release
FROM scratch
COPY --from=builder-core /emgauwa/core/target/x86_64-unknown-linux-musl/release/emgauwa-core /usr/bin/emgauwa-core
COPY --from=builder-controller /emgauwa/controller/target/x86_64-unknown-linux-musl/release/emgauwa-controller /usr/bin/emgauwa-controller
CMD ["echo", "please specify command /usr/bin/emgauwa-core or /usr/bin/emgauwa-controller"]