In this tutorial, I am written Docker my note. Docker the essential for DevOps Roles.
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Solve the problem: Add this user to the docker group.
Detach and Attach
- Detach : Ctrl-p + Ctrl-q
- Attach : docker attach [container]
Why can not detach?
Solve the problem: docker run with “-i”, “-t” options. http://stackoverflow.com/questions/20145717/how-to-detach-from-a-docker-container
Docker run without -it, but attach, so can not type CTRL-C
Close your terminal! Anything OK.
To safe detach…
Docker run without “-i”, “-t” option. But you want to detach, if you hit Ctrl-C then docker process be killed.
To avoid it, attach with —sig-proxy=false
You want to log in a container…
docker exec -it [container-name] /bin/bash
start on os-startup
docker command “–restart=always”
docker compose add restart: always in docker-compose.yaml file
updating…