Update docker build to use built-in libraries

This commit is contained in:
Mark Brett 2020-01-17 13:20:38 +00:00
parent ada40256a3
commit bb25be8a98
2 changed files with 4 additions and 4 deletions

View file

@ -3,4 +3,3 @@
Dockerfile
example_project
target
vhdl_libraries

View file

@ -3,9 +3,10 @@ FROM clux/muslrust:$RUST_VERSION as builder
WORKDIR /volume
COPY . /volume/
ARG CRATE
RUN cargo build --package $CRATE --release
RUN cargo build --manifest-path $CRATE/Cargo.toml --release --features "packaged"
FROM scratch
ARG CRATE
COPY --from=builder /volume/target/x86_64-unknown-linux-musl/release/$CRATE /app
ENTRYPOINT ["/app"]
COPY --from=builder /volume/target/x86_64-unknown-linux-musl/release/$CRATE /app/bin
COPY --from=builder /volume/vhdl_libraries /app/vhdl_libraries
ENTRYPOINT ["/app/bin"]