Invalid repository/tag: invalid reference format
daddydrac opened this issue ยท 10 comments
This is the error I get:
Step 1/10 : FROM microsoft/aspnetcore-build:2.0 AS buildenv Error parsing reference: "microsoft/aspnetcore-build:2.0 AS buildenv" is not a valid repository/tag: invalid reference format Build step 'Execute shell' marked build as failure
@joehoeller - What version of Docker do you have installed? Given the error you mention, I suspect you are using an older build. The samples makes use of the Docker multi-stage build feature.
Readme snippet:
It uses the Docker multi-stage build feature to build the sample in a container based on the larger ASP.NET Core Build Docker base image and then copies the final build result into a Docker image based on the smaller ASP.NET Core Docker Runtime base image. The build image contains tools that are required to build applications while the runtime image does not.
This sample requires Docker 17.06 or later of the Docker client. You need the latest Windows 10 or Windows Server 2016 to use Windows containers. The instructions assume you have the Git client installed.
I think we are building on Linux with .Net Core 2.0, let me find out what they all implemented. They are using Jenkins as well. Give me another 1-1.5hrs and I'll have an answer from that team.
Here is the versions of the Linux RHEL Server, Docker, Jenkins and the RHEL Server plug in:
`docker-ce-selinux-17.03.1.ce-1.el7.centos.noarch
docker-ce-17.03.1.ce-1.el7.centos.x86_64
docker-rhel-push-plugin-1.12.6-11.el7.x86_64`
- And of course .NET Core 2.0
The version of Docker you are using does not support multi-stage Dockerfiles. If you want to use multi-stage Dockerfiles like the samples do, then you will need to upgrade your version of Docker.
No prob, I'll close the issue. Thank you kindly for your support - much appreciated man! :)
I've got the same issue. @joehoeller did you guys figure out what to do with the error? I'm running docker on RHEL 7.
Docker version 1.12.6, build ec8512b/1.12.6
Adding the exact error message for clarity:
Error parsing reference: "microsoft/aspnetcore-build:2.0 AS build-env" is not a valid repository/tag: invalid reference format
/usr/bin/docker failed with return code: 1
I have tried updating RHEL yum docker package to docker-latest. The latest version is still 1.12.6.
@corpix-net I'm on the same boat with you just now and had no clues at all whats going on for few hours.
Are you using docker.io? That is super old ones by linux distro. You need to use docker-ce
https://docs.docker.com/engine/installation/linux/docker-ce/debian/#install-docker-ce-1
I am using AWS ECS now - which manages the base-lines (almost) by itself, but I will be following this thread to see what the issue is with RHEL 7. I'm no Linux guy, but the latest docker package available seems to be old (1.12.6) although I am not sure if upgrading docker would resolve the issue.
@corpix-net - I don't think RHEL has upgraded their Docker version to include the multi-stage build feature. See https://access.redhat.com/solutions/3188122. This is unfortunate as the multi-stage build feature is extremely useful and makes so many things easy and more straightforward.