diff options
| author | n1c00o <git.n1c00o@gmail.com> | 2021-08-05 15:18:54 +0200 |
|---|---|---|
| committer | n1c00o <git.n1c00o@gmail.com> | 2021-08-05 15:18:54 +0200 |
| commit | f4fc81401854828b73fb7b99c2982cfc72f7432b (patch) | |
| tree | 4d5247ea9bdb0c4f5b4c1f78e6167e30ad0f2c84 | |
| parent | 415ac374f0e2ec721c1f35cc106c2b118babe55c (diff) | |
Add Dockerfile
| -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" ] |
