5

I am working on microservice using docker on visual studio 2017. I’ve been dealing with this error for half a day.

Severity Code Description Project File Line Suppression State Error Creating network "dockercompose8357222465790585823_default" with the default driver Building Pricing.api invalid reference format: repository name must be lowercase. 

Here is the compose content version: '3'

services: Pricing.api: image: Pricing.api build: context: ../PricingAPI dockerfile: Dockerfile 

and docker file

FROM microsoft/aspnetcore:2.0 ARG source WORKDIR /app EXPOSE 80 COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", "PricingAPI.dll"] 

Here is the ci version: '3'

services: ci-build: image: microsoft/aspnetcore-build:2.0-2.0 volumes: - .:/src working_dir: /src command: /bin/bash -c "dotnet restore ./Pricing.MicroService.sln && dotnet publish ./Pricing.MicroService.sln -c Release -o ./obj/Docker/publish" 

what is it referring when it says by repository ?

1 Answer 1

7

It turns out that by repository it meant ‘service’. I updated service name as show bellow and it works.

 services: Pricing.api: => pricing.api with lowercase ‘p’ environment: - ASPNETCORE_ENVIRONMENT=Development ports: - "80" 

It should have said

invalid reference format. Service name must be lowercase .

This is a confusing error message. This is something Docker team has to fix imo.

Sign up to request clarification or add additional context in comments.

1 Comment

All of my services are lower case and I still get this error. I am hosting .Net Core in Windows Container. I can connect via SSMS, but I get this same silly error when I try to connect from my api

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.