Juliatzin
Juliatzin

Reputation: 19695

Push Docker image to Gitlab Registry when repository have two Docker images (client and server)

I have a Gitlab Repository that hosts a web app made with React / NodeJS, So, I have the client and server in the same repo.

App is working, and I want to use Gitlab Registry my Docker images (client and server).

Thing is my repository has the name: gitlab.com/group/project

And it is expecting a Docker image with the same name.

Instead, I have two Docker images:

So, it won't let me push my images. I get:

denied: requested access to the resource is denied

How can I do it ? I don't want to make two repositories.

Upvotes: 3

Views: 11305

Answers (1)

Juliatzin
Juliatzin

Reputation: 19695

I could solve it using:

docker push registry.gitlab.com/group/project/api
docker push registry.gitlab.com/group/project/client

Here is what it looks like in the UI:

enter image description here

As specified in the relevant gitlab documentation chapter, you can use up to three levels for your images names:

  • registry.gitlab.com/group/project:tag
  • registry.gitlab.com/group/project/image1:tag
  • registry.gitlab.com/group/project/module1/image1:tag

Upvotes: 8

Related Questions