0

I have the following problem and have not yet found a solution in any other post.

I am currently working in an SSH shell and should "move" one or more apps from another SSH shell. The apps are GitLab repositories with docker and gitlab CI/CD, and are accessible via https.

In the SSH shell are docker-compose.yml, in which the own server (with GitLab) is specified as image. So not from the official GitLab site.


app:
    image: server:port/path/respository/image:tag

And the problem is that I get an error "Denied: Access Forbidden" when I want to create a docker-compose service (docker-compose@*.service), with systemctl.

Since I am not yet very experienced in docker-compose and SSH shell, I don't know exactly how to fix the error. There is no variable in environment that refers to an authorization or that is needed for the container registry in GitLab. And the link to the container is also correct. Since it runs in the other SSH shell, I am not sure why the docker-compose does not work in the new SSH shell.

If the same services cannot run on different SSH shells, I would still understand that, but I don't understand why I can't download the image even though it is possible in the other one.

With the setting

app:
    image: docker login server:port/path/respository/image:tag

I get the error: "unable to get image: Error response from daemon: invalid reference format"

Does anyone have an idea why the docker-compose works in the other shell but not in the new shell?

The required installations to be able to use docker, systemctl, for example, should generally be complete, as I had internal instructions for setting them up.

1 Answer 1

0

I have solved it.

All I had to do was create the .docker folder in the home directory and define the authorization values in a new "config.json" file. This allowed docker to log in via the URL.

Docker uses the config.json automatically.

EXAMPLE:

"auths": {
    "<URL>": {
        "auth": "<key>"
    }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.