Docker Community Forums

Share and learn in the Docker community.

Docker Quick Start Doodle - Run Git Clone via Docker


I’m setting up Docker Desktop on Windows. Working through the Quick Start Doodle tutorial, I’ve run into this problem, which I can’t seem to get around…

$ docker build -t jbstfg/cheers2019 . --no-cache

If I run git clone
It clones without any problems.

The closest I could get to a solution was this:

As you will see, the best solution is to ask in the forums, so here I am!

It seems like the root certificates are removed from the golang image on build. Could you try to add the ca-certificates on the apk add command so that they get re-installed with git?

This builds for me

FROM golang:1.11-alpine AS builder

RUN apk add --no-cache git ca-certificates

RUN go get