Showing posts with label docker. Show all posts
Showing posts with label docker. Show all posts

Wednesday, September 16, 2020

private docker registry nasıl oluşturulur?

 [aokanx@control-plane opt]$ cd /opt

 [aokanx@control-plane opt]$ ls
containerd  docker-registry  gitlab
 

[aokanx@control-plane opt]$ cd docker-registry/
 

[aokanx@control-plane docker-registry]$ ls
data  docker-compose.yml


[aokanx@control-plane docker-registry]$ cat docker-compose.yml
version: '3'

services:
  registry:
    image: registry:2
    ports:
    - "5000:5000"
    environment:
      REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
    volumes:
      - ./data:/data

Sunday, May 10, 2020

docker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

Problem:
localuser@ubuntu:~$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

Solution:

localuser@ubuntu:~$ sudo su -
root@ubuntu:~# usermod -g docker localuser

localuser@ubuntu:~$ sudo su
root@ubuntu:/home/localuser# chmod 666 /var/run/docker
docker/      docker.pid   docker.sock 
root@ubuntu:/home/localuser# chmod 666 /var/run/docker.sock
root@ubuntu:/home/localuser# exit
exit
localuser@ubuntu:~$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
localuser@ubuntu:~$