diff options
| -rw-r--r-- | .dockerignore | 7 | ||||
| -rw-r--r-- | Dockerfile | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..206d2d0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +LICENSE +*.md +.git/ +.vscode/ +target/ +bin/ +clawflake.rs diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ff70f42 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM rust:alpine3.14 AS build +RUN cargo install cargo-build-deps \ + && cd /tmp \ + && USER=root cargo new --bin clawflake +WORKDIR /tmp/clawflake +COPY Cargo.toml Cargo.lock ./ +RUN cargo build-deps --release +COPY src /tmp/clawflake/src +RUN cargo build --bin clawflake-server --release + +FROM alpine:3.14 +WORKDIR /app +COPY --from=build /app/target/release/clawflake-server ./ +CMD [ "./clawflake-server" ] |
