On 5/8/24 4:08 AM, Carlos E. R. wrote:
On 2024-05-07 15:56, Simon Lees wrote:
On 5/7/24 9:27 PM, Carlos E. R. wrote:
On 2024-05-07 12:32, Simon Lees wrote:
It really is as simple as described in the usage section (I chose podman over docker for reasons)
docker run -p 8080:8080 -v /your/storage/:/tmp/osuse_cache/ -u X:X firstyear/opensuse_proxy_cache:latest
I take "/your/storage/" is the large disk space to store the cache. And "/tmp/osuse_cache/", what is it?
Whenever you see an option with a ":" its basically mapping something from your host system to something inside the container, so "/your/storage" on your physical machine gets mapped to "/tmp/osuse_cache/" inside the container.
I installed docker, which brought
catatonit containerd criu docker docker-bash-completion docker-buildx docker-rootless-extras docker-zsh-completion fuse-overlayfs git-core git-gui git-web gitk libnet9 libsha1detectcoll1 libslirp0 perl-CGI perl-Error perl-Git python3-ipaddr python3-protobuf rootlesskit runc slirp4netns
cer@Isengard:~> docker run -p 8080:8080 -v /data/hoard_2/osuse_cache/:/tmp/osuse_cache/ -u X:X firstyear/opensuse_proxy_cache:latest docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. See 'docker run --help'. cer@Isengard:~>
Running "systemctl start docker".
cer@Isengard:~> docker run -p 8080:8080 -v /data/hoard_2/osuse_cache/:/tmp/osuse_cache/ -u X:X firstyear/opensuse_proxy_cache:latest docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'. cer@Isengard:~>
Docker has to be run as root?
It is possible to run some containers not as root, but you might need to be in the right group. I don't know if this is such a container I am also not a docker expert.
Isengard:~ # docker run -p 8080:8080 -v /data/hoard_2/osuse_cache/:/tmp/osuse_cache/ -u X:X firstyear/opensuse_proxy_cache:latest Unable to find image 'firstyear/opensuse_proxy_cache:latest' locally latest: Pulling from firstyear/opensuse_proxy_cache 9057b302fcfd: Pull complete fa32021715b2: Pull complete 1cd46f9ba906: Pull complete 7bb1a2809339: Pull complete b8bb2eabb8f0: Pull complete 428078d06f46: Pull complete a7de8e218dc2: Pull complete 0bd56b2411a0: Pull complete 8822301f7c75: Pull complete Digest: sha256:5c4fa25af847cc405bacf09415706053dcc7bb287fb25884ca47020cf1543efc Status: Downloaded newer image for firstyear/opensuse_proxy_cache:latest docker: Error response from daemon: unable to find user X: no matching entries in passwd file. ERRO[0015] error waiting for container: Isengard:~ #
Huh, so what user must be that X?
Apparently in a past life I created a separate user "osuse_cache" that is just part of the "users" group, which on my system has the uid 1001, so I pass that in. In my case that user has permission to read and write to "/your/storage/" -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B