-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.tmpl
45 lines (33 loc) · 1.17 KB
/
Dockerfile.tmpl
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
37
38
39
40
41
42
43
44
45
FROM docker.io/library/golang:{{ .data.go }} as go
COPY lib/go.env /usr/local/go/
RUN mkdir -p /build/bin
FROM scratch AS shellcheck
COPY --from=docker.io/koalaman/shellcheck:v0.10.0 /bin/shellcheck /build/bin/
FROM scratch AS jq
COPY --from=ghcr.io/jqlang/jq:1.7.1 /jq /build/bin/
FROM docker.io/library/debian:stable-slim AS final
RUN apt-get update && \
apt-get install -y \
build-essential \
docker.io \
file \
git \
pkg-config \
libgpgme11 \
curl \
ca-certificates \
&& \
rm -rf /var/cache/apt /var/lib/apt && \
mkdir -p /var/cache/apt /var/lib/apt
COPY lib/image-test /usr/local/bin
COPY lib/get-latest-gbt-version /usr/local/bin
COPY --from=go /usr/local/go /usr/local/go
ARG TARGETOS
ARG TARGETARCH
ADD dist/${TARGETOS}-${TARGETARCH}/* /usr/local/bin/
COPY --from=shellcheck /build/bin/* /usr/local/bin/
COPY --from=jq /build/bin/* /usr/local/bin/
ENV PATH="/usr/local/go/bin:${PATH}"
{{ range $pkg, $info := .data }}
### COPY --from={{ $pkg }} /build/bin/* /usr/local/bin/
{{ end }}