From 7f1cf56775db53de05caaa7774fbc5141e58787b Mon Sep 17 00:00:00 2001 From: Jack Rubacha Date: Sun, 29 Dec 2024 23:06:33 -0500 Subject: [PATCH] docker fixups --- .dockerignore | 27 +++++++++++++++++++++++++++ Dockerfile | 10 +++++----- 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..abcf183 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,27 @@ +# editor things +.idea/ +.zed/ +.vscode/ + +# misc things +.DS_Store +.gitignore +*.nix + +# python things +pyrightconfig.json +__pycache__/ + +# Added by cargo (rust things) +/target +build/ +dist/ +logs/ + +# protobuf +mod.rs +command_data.rs +serverdata.rs + +# private testing +/privatetest/ diff --git a/Dockerfile b/Dockerfile index 447de54..beacd1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,14 @@ COPY . . RUN git submodule update --init RUN apt-get update && apt-get install -y libssl-dev build-essential cmake -RUN cargo install --path --locked --bins . +RUN cargo build --all --release FROM debian:bookworm-slim -RUN apt update -RUN apt install openssl -y +RUN apt-get update +RUN apt-get install openssl -y -COPY --from=builder /usr/local/cargo/bin/calypso /usr/local/bin/calypso -COPY --from=builder /usr/local/cargo/bin/calypso-simulate /usr/local/bin/calypso-simulate +COPY --from=builder /usr/src/calypso/target/release/calypso /usr/local/bin/calypso +COPY --from=builder /usr/src/calypso/target/release/calypso-simulate /usr/local/bin/calypso-simulate CMD ["calypso-simulate"]