forked from viaduct-ai/kustomize-sops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (23 loc) · 838 Bytes
/
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
ARG GO_VERSION="1.19"
#--------------------------------------------#
#--------Build KSOPS and Kustomize-----------#
#--------------------------------------------#
FROM golang:$GO_VERSION
LABEL org.opencontainers.image.source="https://github.com/viaduct-ai/kustomize-sops"
ARG TARGETPLATFORM
ARG PKG_NAME=ksops
# Match Argo CD's build
ENV GO111MODULE=on
# Define kustomize config location
ENV XDG_CONFIG_HOME=$HOME/.config
# Export templated Go env variables
RUN export GOOS=$(echo ${TARGETPLATFORM} | cut -d / -f1) && \
export GOARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) && \
export GOARM=$(echo ${TARGETPLATFORM} | cut -d / -f3 | cut -c2-)
WORKDIR /go/src/github.com/viaduct-ai/kustomize-sops
ADD . .
# Perform the build
RUN make install
# Install kustomize via Go
RUN make kustomize
CMD ["kustomize", "version"]