-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 821 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 821 Bytes
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
FROM golang:1.21.0-alpine3.18 as builder
LABEL org.opencontainers.image.source https://github.com/mocha-bot/donut
RUN apk update && apk upgrade && \
apk --no-cache --update add git make
WORKDIR /app
COPY . .
RUN go mod tidy && \
go mod download && \
go build -v -o engine && \
chmod +x engine
## Distribution
FROM alpine:latest
# Install dependencies
RUN apk update && apk upgrade && \
apk --no-cache --update add ca-certificates tzdata && \
mkdir donut
# Install Doppler CLI
RUN wget -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/cli@doppler-8004D9FF50437357.rsa.pub && \
echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories && \
apk add doppler
WORKDIR /donut
COPY --from=builder /app/engine /donut