forked from jmug/stoatchat
Update Docker image to use buster-slim + glibc.
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,5 +1,5 @@
|
||||
# Build Stage
|
||||
FROM ekidd/rust-musl-builder:nightly-2021-02-13 AS builder
|
||||
FROM rustlang/rust:nightly-slim AS builder
|
||||
USER 0:0
|
||||
WORKDIR /home/rust/src
|
||||
|
||||
@@ -7,16 +7,16 @@ RUN USER=root cargo new --bin revolt
|
||||
WORKDIR /home/rust/src/revolt
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY src/bin/dummy.rs ./src/bin/dummy.rs
|
||||
RUN cargo build --release --bin dummy
|
||||
RUN apt-get update && apt-get install -y libssl-dev pkg-config && cargo build --release --bin dummy
|
||||
|
||||
COPY assets/templates ./assets/templates
|
||||
COPY src ./src
|
||||
RUN cargo build --release
|
||||
RUN cargo install --locked --path .
|
||||
|
||||
# Bundle Stage
|
||||
FROM alpine:latest
|
||||
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
|
||||
COPY --from=builder /home/rust/src/revolt/target/x86_64-unknown-linux-musl/release/revolt ./
|
||||
FROM debian:buster-slim
|
||||
RUN apt-get update && apt-get install -y ca-certificates
|
||||
COPY --from=builder /usr/local/cargo/bin/revolt ./
|
||||
COPY assets ./assets
|
||||
EXPOSE 8000
|
||||
EXPOSE 9000
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
export version=0.5.3-alpha.1
|
||||
export version=0.5.3-alpha.2
|
||||
echo "pub const VERSION: &str = \"${version}\";" > src/version.rs
|
||||
|
||||
@@ -1 +1 @@
|
||||
pub const VERSION: &str = "0.5.3-alpha.1";
|
||||
pub const VERSION: &str = "0.5.3-alpha.2";
|
||||
|
||||
Reference in New Issue
Block a user