$ docker build .
Sending build context to Docker daemon 778.2kB
Step 1/18 : FROM golang:1.17 AS builder
1.17: Pulling from library/golang
d836772a1c1f: Pull complete
66a9e63c657a: Pull complete
d1989b6e74cf: Pull complete
c28818711e1e: Pull complete
9d6246ba248c: Pull complete
21d43f0d73c2: Pull complete
d8a1c5873f40: Pull complete
Digest: sha256:87262e4a4c7db56158a80a18fefdc4fee5accc41b59cde821e691d05541bbb18
Status: Downloaded newer image for golang:1.17
---> 742df529b073
Step 2/18 : ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
---> Running in 47a1a4784b81
Removing intermediate container 47a1a4784b81
---> 851ceb5238ce
Step 3/18 : RUN apt-get install --yes --no-install-recommends ca-certificates tzdata
---> Running in 8c89c9549b82
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20210119).
tzdata is already the newest version (2021a-1+deb11u4).
tzdata set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Removing intermediate container 8c89c9549b82
---> 6b08dc514df4
Step 4/18 : RUN adduser --shell /bin/true --uid 1000 --disabled-login --no-create-home --gecos '' app && sed -i -r "/^(app|root)/!d" /etc/group /etc/passwd && sed -i -r 's#^(.*):[^:]*$#\1:/sbin/nologin#' /etc/passwd
---> Running in 90400b838b54
Adding user `app' ...
Adding new group `app' (1000) ...
Adding new user `app' (1000) with group `app' ...
Not creating home directory `/home/app'.
Removing intermediate container 90400b838b54
---> 565ad9119e77
Step 5/18 : WORKDIR /go/src/app/
---> Running in 73adebd6a11c
Removing intermediate container 73adebd6a11c
---> e785d0afc296
Step 6/18 : VOLUME /go/pkg/mod
---> Running in 16c6622ba3ba
Removing intermediate container 16c6622ba3ba
---> 29484d9e6e4a
Step 7/18 : COPY go.mod go.sum ./
---> 0f5f42dbc58a
Step 8/18 : RUN go mod download
---> Running in 7c81b8ccf72c
go mod download: cloud.google.com/go@v0.99.0: Get "https://proxy.golang.org/cloud.google.com/go/@v/v0.99.0.info": x509: certificate signed by unknown authority
go mod download: github.com/Azure/go-autorest@v14.2.0+incompatible: Get "https://proxy.golang.org/github.com/%21azure/go-autorest/@v/v14.2.0+incompatible.info": x509: certificate signed by unknown authority
go mod download: github.com/Azure/go-autorest/autorest@v0.11.19: Get "https://proxy.golang.org/github.com/%21azure/go-autorest/autorest/@v/v0.11.19.info": x509: certificate signed by unknown authority
go mod download: github.com/Azure/go-autorest/autorest/adal@v0.9.14: Get "https://proxy.golang.org/github.com/%21azure/go-autorest/autorest/adal/@v/v0.9.14.info": x509: certificate signed by unknown authority
go mod download: github.com/Azure/go-autorest/autorest/date@v0.3.0: Get "https://proxy.golang.org/github.com/%21azure/go-autorest/autorest/date/@v/v0.3.0.info": x509: certificate signed by unknown authority
go mod download: github.com/Azure/go-autorest/logger@v0.2.1: Get "https://proxy.golang.org/github.com/%21azure/go-autorest/logger/@v/v0.2.1.info": x509: certificate signed by unknown authority
go mod download: github.com/Azure/go-autorest/tracing@v0.6.0: Get "https://proxy.golang.org/github.com/%21azure/go-autorest/tracing/@v/v0.6.0.info": x509: certificate signed by unknown authority
go mod download: github.com/PuerkitoBio/purell@v1.1.1: Get "https://proxy.golang.org/github.com/%21puerkito%21bio/purell/@v/v1.1.1.info": x509: certificate signed by unknown authority
...
...
...
The command '/bin/sh -c go mod download' returned a non-zero code: 1
ISSUE TYPE
BUG REPORT
SUMMARY
The
docker build .
command fails to build the docker image.ENVIRONMENT
commit e3cb0c93d140454249022d1f635d43bd5aa4f7ce
STEPS TO REPRODUCE
Run
docker build .
with latest Dockerfile version
https://github.com/Shopify/kubeaudit/commit/fc078cfb40f06d1f1b072f93dd9c72c5540d817e
EXPECTED RESULTS
Build docker image successfully.
ACTUAL RESULTS