All checks were successful
build/base Building image base
build/frp Building image frp
build/fluentd Building image fluentd
build/node-script Building image node-script
build/forgejo Building image forgejo
build/ruby-script Building image ruby-script
build/python-script Building image python-script
build/gotenberg Building image gotenberg
build/lua-clib Building image lua-clib
build/fava Building image fava
build/nextcloud Building image nextcloud
build/gitea Building images gitea-package, gitea-pr, gitea-status
build/rust-xwin Building image rust-xwin
Reviewed-on: #144
29 lines
811 B
Docker
29 lines
811 B
Docker
FROM rust:1.84.0-alpine3.20 AS builder
|
|
|
|
RUN apk add --no-cache musl-dev;
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
RUN --mount=type=cache,id=cargo-registry,target=/usr/local/cargo/registry \
|
|
--mount=type=cache,id=cargo-target,target=/app/target \
|
|
set -e; \
|
|
cargo build --color always --release --locked; \
|
|
# The cache will disappear after this directive, so we
|
|
# need to copy the binary to a persistent place.
|
|
cp target/release/gitea /app/gitea;
|
|
|
|
FROM alpine:3.21.2 AS final
|
|
|
|
RUN apk add --no-cache ca-certificates;
|
|
|
|
ENV RUST_BACKTRACE=1
|
|
ENV RUST_LOG=info
|
|
|
|
COPY --from=builder /app/gitea /bin/
|
|
|
|
# Put this last, as it's the only thing that's different between variants.
|
|
# This way, the previous layers can all be shared.
|
|
|
|
ARG VARIANT="missing build arg 'VARIANT'"
|
|
COPY ./shims/${VARIANT}/* /opt/resource/
|