CI
Some checks failed
CI / Check typos (push) Successful in 8s
CI / Check links (push) Successful in 18s
CI / Check version (push) Failing after 16s
CI / Build and push Docker image (push) Failing after 1m12s
CI / Clippy (push) Has started running
CI / Build, test, upload (push) Has been cancelled
Some checks failed
CI / Check typos (push) Successful in 8s
CI / Check links (push) Successful in 18s
CI / Check version (push) Failing after 16s
CI / Build and push Docker image (push) Failing after 1m12s
CI / Clippy (push) Has started running
CI / Build, test, upload (push) Has been cancelled
This commit is contained in:
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
FROM rust:1.91-bookworm AS base
|
||||
|
||||
#
|
||||
# MARK: Build
|
||||
#
|
||||
FROM base AS build
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates wget unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app/rust
|
||||
COPY . .
|
||||
RUN cargo build --release --workspace
|
||||
RUN cargo test --release --workspace
|
||||
|
||||
#
|
||||
# MARK: Release
|
||||
#
|
||||
FROM debian:bookworm@sha256:00cd074b40c4d99ff0c24540bdde0533ca3791edcdac0de36d6b9fb3260d89e2 AS deploy
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=build \
|
||||
/app/rust/target/release/webpage \
|
||||
/app/bin/
|
||||
|
||||
ENV PATH="/app/bin:$PATH"
|
||||
ENV RUST_BACKTRACE=full
|
||||
|
||||
ENTRYPOINT ["webpage", "--help"]
|
||||
Reference in New Issue
Block a user