kubernetes-sigs/kubebuilder

Error parsing reference: "golang:1.9.3 as builder" is not a valid repository/tag: invalid reference format

cmoulliard opened this issue · 3 comments

Kubebuilder version use : 0.1.11

During the process to build the Dockerfile.controller, then docker reports this error

docker build . -f Dockerfile.controller -t gcr.io/kubeships/controller-manager:v1
Sending build context to Docker daemon    246MB
Step 1/23 : FROM golang:1.9.3 as builder
Error parsing reference: "golang:1.9.4 as builder" is not a valid repository/tag: invalid reference format

Do we need to use a specific version of docker to perform this build ?

The error is due to the fact that multi-stage docker build is not supported by distribution of Centos/Fedora Docker which is a bit outdated (docker 1.13).

I can get rid of this issue by using the imagebuilder tool -> https://github.com/openshift/imagebuilder

droot commented

This should be fixed now. Pl. re-open if you run in to this issue with latest version of Kubebuilder.

had the same issue, didn't realize that dnf install docker on Fedora 30 installs an ancient version. https://docs.docker.com/install/linux/docker-ce/fedora/ fixed me up.