@lime yew - I have one repo that I must be doing something stupid in, so I'm trying to debug it, and even my debugging is messed up. I'm still having problems with RUN go mod download -x in one Dockerfile, so now I have this:
FROM golang:1.22 as builder
RUN addgroup --system --gid 1001 appuser && adduser --system --uid 1001 appuser --ingroup appuser
WORKDIR /build
ARG TOKEN=${TOKEN}
ENV CGO_ENABLED=0
ENV GOPRIVATE=github.com/gmlewis/*
COPY go.mod .
COPY go.sum .
RUN go version
RUN go mod download -x
But I can't seem to see the output from either the go version or the go mod download -x commands.
Here's my code: https://gist.github.com/gmlewis/40b1e34e5131dfd27c7c2a0d7b8b6976 and https://gist.github.com/gmlewis/c044049bcb09a5ef97a2ef5c655bec96
and the output is:
2024/04/17 16:52:35 BuildAndPublishToAzure: Building container from "Dockerfile"
2024/04/17 16:52:36 ScanContainer FAILED: input: container.build.asTarball resolve: container image to tarball file conversion failed: failed to solve for container publish: process "/bin/sh -c go mod download -x" did not complete successfully: exit code: 1
stdout:
input: container.build.stdout resolve: process "/bin/sh -c go mod download -x" did not complete successfully: exit code: 1
2024/04/17 16:52:36 Trivy ScanContainer error: input: container.build.asTarball resolve: container image to tarball file conversion failed: failed to solve for container publish: process "/bin/sh -c go mod download -x" did not complete successfully: exit code: 1
exit status 1
Error: Process completed with exit code 1.
Any ideas what I'm doing wrong?