all repos — albus-go @ main

Dockerfile (view raw)

 1# syntax=docker/dockerfile:1
 2
 3FROM golang:alpine AS builder
 4
 5WORKDIR /build
 6
 7# Download Go modules
 8RUN apk update && \
 9    apk add --no-cache \
10    git
11
12COPY . .
13RUN git submodule update --init --recursive
14RUN go mod download
15
16# Build
17RUN CGO_ENABLED=0 go build -trimpath -o /dist/app
18
19# Test
20FROM build-stage AS run-test-stage
21RUN go test -v ./...
22
23FROM alpine:latest AS build-release-stage
24
25RUN apk update && \
26    apk add --no-cache \
27    pandoc \
28    tectonic
29
30#COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
31COPY --from=builder /dist /app
32
33WORKDIR /app
34
35ENTRYPOINT ["/app/app"]