[GH-ISSUE #248] Failed to build in docker after commit 0603a13b #159

Closed
opened 2026-02-25 22:32:45 +03:00 by kerem · 3 comments
Owner

Originally created by @Renkar on GitHub (Mar 22, 2020).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/248

Building mkcert
Step 1/14 : FROM alpine:edge
---> 24cae4d038c0
Step 2/14 : RUN apk add --no-cache ca-certificates
---> Using cache
---> 68ea5cade319
Step 3/14 : RUN apk -v --update add bash git curl make gcc musl-dev openssl go python py-pip feh rm -f /var/cache/apk/*
---> Using cache
---> 451d3aa194b3
Step 4/14 : RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
---> Using cache
---> 9e814938bb20
Step 5/14 : ENV GOLANG_VERSION 1.10.3
---> Using cache
---> bef43f5de822
Step 6/14 : RUN set -eux;
---> Using cache
---> 919fb38a9667
Step 7/14 : RUN export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOOS="$(go env GOOS)" GOARCH="$(go env GOARCH)" GOHOSTOS="$(go env GOHOSTOS)" GOHOSTARCH="$(go env GOHOSTARCH)" ; apkArch="$(apk --print-arch)"; case "$apkArch" in armhf) export GOARM='6' ;; x86) export GO386='387' ;; esac; wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; echo '567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2 go.tgz' | sha256sum -c -; tar -C /usr/local -xzf go.tgz; rm go.tgz; cd /usr/local/go/src; for p in /go-alpine-patches/.patch; do [ -f "$p" ] || continue; patch -p2 -i "$p"; done; ./make.bash; rm -rf /go-alpine-patches; apk del .build-deps; export PATH="/usr/local/go/bin:$PATH"; go version
---> Using cache
---> 046f1ac2dfe5
Step 8/14 : ENV GOPATH /go
---> Using cache
---> ec5057f1e1be
Step 9/14 : ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
---> Using cache
---> d2ee7c63eb7a
Step 10/14 : RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
---> Using cache
---> 5d0d30e0af7e
Step 11/14 : RUN cd /go && go get -u github.com/FiloSottile/mkcert && cd src/github.com/FiloSottile/mkcert && go build -o /bin/mkcert
---> Running in 090dd4f3c3c6
github.com/FiloSottile/mkcert
src/github.com/FiloSottile/mkcert/main.go:118:23: undefined: debug.ReadBuildInfo
ERROR: Service 'mkcert' failed to build: The command '/bin/sh -c cd /go && go get -u github.com/FiloSottile/mkcert && cd src/github.com/FiloSottile/mkcert && go build -o /bin/mkcert' returned a non-zero code: 2

Originally created by @Renkar on GitHub (Mar 22, 2020). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/248 Building mkcert Step 1/14 : FROM alpine:edge ---> 24cae4d038c0 Step 2/14 : RUN apk add --no-cache ca-certificates ---> Using cache ---> 68ea5cade319 Step 3/14 : RUN apk -v --update add bash git curl make gcc musl-dev openssl go python py-pip feh rm -f /var/cache/apk/* ---> Using cache ---> 451d3aa194b3 Step 4/14 : RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf ---> Using cache ---> 9e814938bb20 Step 5/14 : ENV GOLANG_VERSION 1.10.3 ---> Using cache ---> bef43f5de822 Step 6/14 : RUN set -eux; ---> Using cache ---> 919fb38a9667 Step 7/14 : RUN export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOOS="$(go env GOOS)" GOARCH="$(go env GOARCH)" GOHOSTOS="$(go env GOHOSTOS)" GOHOSTARCH="$(go env GOHOSTARCH)" ; apkArch="$(apk --print-arch)"; case "$apkArch" in armhf) export GOARM='6' ;; x86) export GO386='387' ;; esac; wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; echo '567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2 *go.tgz' | sha256sum -c -; tar -C /usr/local -xzf go.tgz; rm go.tgz; cd /usr/local/go/src; for p in /go-alpine-patches/*.patch; do [ -f "$p" ] || continue; patch -p2 -i "$p"; done; ./make.bash; rm -rf /go-alpine-patches; apk del .build-deps; export PATH="/usr/local/go/bin:$PATH"; go version ---> Using cache ---> 046f1ac2dfe5 Step 8/14 : ENV GOPATH /go ---> Using cache ---> ec5057f1e1be Step 9/14 : ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH ---> Using cache ---> d2ee7c63eb7a Step 10/14 : RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" ---> Using cache ---> 5d0d30e0af7e Step 11/14 : RUN cd /go && go get -u github.com/FiloSottile/mkcert && cd src/github.com/FiloSottile/mkcert && go build -o /bin/mkcert ---> Running in 090dd4f3c3c6 github.com/FiloSottile/mkcert **src/github.com/FiloSottile/mkcert/main.go:118:23: undefined: debug.ReadBuildInfo ERROR: Service 'mkcert' failed to build: The command '/bin/sh -c cd /go && go get -u github.com/FiloSottile/mkcert && cd src/github.com/FiloSottile/mkcert && go build -o /bin/mkcert' returned a non-zero code: 2**
kerem closed this issue 2026-02-25 22:32:45 +03:00
Author
Owner

@FiloSottile commented on GitHub (Mar 22, 2020):

ENV GOLANG_VERSION 1.10.3

The earliest supported Go version is 1.13.

<!-- gh-comment-id:602226121 --> @FiloSottile commented on GitHub (Mar 22, 2020): > ENV GOLANG_VERSION 1.10.3 The earliest supported Go version is 1.13.
Author
Owner

@FiloSottile commented on GitHub (Mar 22, 2020):

Also, I recommend using these installation instructions instead of go get -u.

git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
<!-- gh-comment-id:602226471 --> @FiloSottile commented on GitHub (Mar 22, 2020): Also, I recommend using these installation instructions instead of `go get -u`. ``` git clone https://github.com/FiloSottile/mkcert && cd mkcert go build -ldflags "-X main.Version=$(git describe --tags)" ```
Author
Owner

@Renkar commented on GitHub (Mar 23, 2020):

Thanks, this solved my problem.

<!-- gh-comment-id:602388122 --> @Renkar commented on GitHub (Mar 23, 2020): Thanks, this solved my problem.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#159
No description provided.