mirror of
https://codeberg.org/demostf/sync.git
synced 2026-06-03 08:34:08 +02:00
use two step dockerfile
This commit is contained in:
parent
8880c6b62c
commit
b05b835b8a
2 changed files with 13 additions and 1 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -1,6 +1,15 @@
|
|||
FROM ekidd/rust-musl-builder AS build
|
||||
|
||||
# We need to add the source code to the image because `rust-musl-builder`
|
||||
# assumes a UID of 1000, but TravisCI has switched to 2000.
|
||||
ADD . ./
|
||||
RUN sudo chown -R rust:rust .
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM scratch
|
||||
|
||||
ADD target/x86_64-unknown-linux-musl/release/sync /
|
||||
COPY --from=build /home/rust/src/target/x86_64-unknown-linux-musl/release/sync /
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["/sync"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue