generated from nhs-england-tools/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
36 lines (33 loc) · 1.11 KB
/
Dockerfile
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
36
# === Builder ==================================================================
# `golang:latest` will be replaced with a specific version stored in ./.tool-versions
FROM golang:latest as builder
WORKDIR /github/workspace
COPY . .
RUN set -ex; \
\
CGO_ENABLED=0 GOOS=linux go build \
-a -installsuffix cgo \
-o ./build/update-from-template ./cmd/update-from-template/
# === Runtime ==================================================================
# `alpine:latest` will be replaced with a specific version stored in ./.tool-versions
FROM alpine:latest
ENV TZ=Europe/London
RUN set -ex; \
\
apk --no-cache add \
bash \
coreutils \
curl \
git \
git-lfs \
github-cli \
gpg \
gpg-agent \
jq \
openssl \
tzdata
COPY --from=builder /github/workspace/build/update-from-template /
COPY --from=builder /github/workspace/entrypoint.sh /
COPY --from=builder /github/workspace/gpg.sh /
COPY --from=builder /github/workspace/scripts/config/update-from-template.yaml /update-from-template.yaml
ENTRYPOINT ["/entrypoint.sh"]