Add Docker and GitLab CI.

This commit is contained in:
Paul Makles
2020-08-30 15:07:45 +01:00
parent 000ffe6aaa
commit 8bb1977025
5 changed files with 113 additions and 110 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# Build Stage
FROM ekidd/rust-musl-builder:nightly-2020-08-26 AS builder
WORKDIR /home/rust/src
RUN USER=root cargo new --bin revolt
WORKDIR ./revolt
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release
# Bundle Stage
FROM scratch
COPY --from=builder /home/rust/src/revolt/target/x86_64-unknown-linux-musl/release/revolt .
EXPOSE 8000
EXPOSE 9000
CMD ["./revolt"]