-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 832 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 832 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
33
# Install required libraries
FROM golang:alpine3.18 AS builder
# Update installed packages
RUN apk -U upgrade
RUN apk add --no-cache git
# Install core dependencies
RUN go install github.com/google/go-jsonnet/cmd/jsonnet@latest && \
go install github.com/google/go-jsonnet/cmd/jsonnet-lint@latest && \
go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest && \
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
# Install jsonnet bundles
COPY jsonnetfile.json jsonnetfile.lock.json /go/
RUN jb install
# Create image for dashboard generation
FROM alpine:latest
# Update installed packages
RUN apk -U upgrade
RUN apk add --no-cache \
ca-certificates
WORKDIR /app
COPY --from=builder /go/vendor /app/vendor
COPY --from=builder /go/bin/* /usr/local/bin/
ENV JSONNET_PATH=/app/vendor