Add docker stuff
This commit is contained in:
parent
004088d3fb
commit
430e2ca814
6 changed files with 85 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
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"]
|
Loading…
Add table
Add a link
Reference in a new issue