azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.1k stars 112 forks source link

[QUESTION]: Private docker registry #124

Closed Kawanaao closed 10 months ago

Kawanaao commented 10 months ago

How can I log in to the container registry in order to pick up a container from there? docker login doesn't work cause cosmos gives an error

[ERROR] Rolling back changes because of -- Image pull error: Error response from daemon: unauthorized: authentication required
azukaar commented 10 months ago

You need to docker login on your daemon, Cosmos pulls your auth from it so it should work

Kawanaao commented 10 months ago

You need to docker login on your daemon, Cosmos pulls your auth from it so it should work

It looks like cosmos is ignoring docker login on the host

image

image

Kawanaao commented 10 months ago

Update

Cosmos cannot interact with data located in the local storage of host, I tried using /bin/sh in the cosmos-cloud container to create a file /root/.docker/config.json manually adding all the data that is specified in the same file on the host and pull was successful

image

dragons-library commented 7 months ago

To elaborate on this, I did the following...

# within the cosmos-server container shell...
docker exec -it cosmos-server bash

# create a directory `/root/.docker`
mkdir -p /root/.docker

# exit the container shell
exit

# copy the local `/root/.docker/config` to the container
docker cp /root/.docker/config.json cosmos-server:/root/.docker/

A longer term solution would probably be to map the path in the cosmos-server container