Update Docker image to use buster-slim + glibc.

This commit is contained in:
Paul
2021-09-15 22:43:23 +01:00
parent b1f5ba32ff
commit 6e1f3a79cf
3 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1 +1 @@
pub const VERSION: &str = "0.5.3-alpha.1";
pub const VERSION: &str = "0.5.3-alpha.2";