blob: d2e30565e3a317603f4f5d8b3161499daae261e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# syntax=docker/dockerfile:1
FROM golang:1.22-alpine AS builder
RUN apk add --no-cache git make sassc
WORKDIR /build
# Download Git submodules
COPY .git ./.git
RUN git submodule update --init --recursive
# Download Go modules
COPY go.mod go.sum ./
RUN go mod download
RUN go mod verify
# Transfer source code
COPY Makefile .
COPY scss ./scss
COPY static ./static
COPY templates ./templates
COPY *.go ./
COPY pkg ./pkg
# Build
RUN make
FROM scratch AS build-release-stage
WORKDIR /app
COPY --from=builder /build/cerrado .
COPY contrib/config.docker.scfg /etc/cerrado.scfg
ENTRYPOINT ["./cerrado"]
|