UNCLASSIFIED

Commit 9016bd22 authored by abrichards's avatar abrichards
Browse files

restore dockerfile to not use go mod cache

parent 8be6a0b2
# NOTE: USING THIS IMAGE UNTIL registry1 credentials are added to IL2 runners
# Build the manager binary
FROM registry.il2.dso.mil/platform-one/devops/pipeline-templates/valkyrie/golang-builder-1.16:1.1 as builder
# note: Adam tried to use GOMODCACHE env variable to pull in go cache
# it worked locally but not with buildah.
WORKDIR /workspace
# set go module cache
ENV GOMODCACHE=/workspace/.gomodcache
# Copy the Go Modules manifests
COPY . .
COPY go.mod go.sum ./
COPY main.go main.go driver.go driver.go ./
COPY apis/ apis/
COPY config/ config/
COPY custom/ custom/
COPY controllers/ controllers/
COPY clients/ clients/
# RUN chmod 755 go.sum
# download with json logging
# RUN go mod download -json
RUN go mod download
# RUN ls -al
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go driver.go
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment