Tag Archives: podman

docker detach from running container

To detach the tty without exiting the shell, use the escape sequence Ctrl+P followed by Ctrl+Q. More details here.

Additional info from this source:

docker run -t -i → can be detached with ^P^Qand reattached with docker attach
docker run -i → cannot be detached with ^P^Q; will disrupt stdin
docker run → cannot be detached with ^P^Q; can SIGKILL client; can reattach with docker attach

podman read logs

sudo podman run --name web1 -dt -p 80:80 docker.io/library/httpd httpd -D FOREGROUND
bf5a2456f8f7e878405097402fe3ed32eb6f9e7b677ac09df1cce841cd7bf527

links -dump http://localhost
It works!

sudo podman container logs -f web1
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.88.0.33. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.88.0.33. Set the 'ServerName' directive globally to suppress this message
[Mon Aug 17 20:32:18.221008 2020] [mpm_event:notice] [pid 1:tid 139846430241920] AH00489: Apache/2.4.46 (Unix) configured -- resuming normal operations
[Mon Aug 17 20:32:18.221243 2020] [core:notice] [pid 1:tid 139846430241920] AH00094: Command line: 'httpd -D FOREGROUND'
10.88.0.1 - - [17/Aug/2020:20:32:45 +0000] "GET / HTTP/1.1" 304 -
10.88.0.1 - - [17/Aug/2020:20:32:45 +0000] "GET / HTTP/1.1" 304 -
10.88.0.1 - - [17/Aug/2020:20:32:48 +0000] "GET / HTTP/1.1" 304 -

add container to pod


sudo podman pod create
4d03c9f1ef5f8f944cb61d598084a1191802694e59e7438b36e1dfecdaa04fe3

sudo podman ps -a --pod
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES POD ID PODNAME
e14f13b36519 k8s.gcr.io/pause:3.2 About a minute ago Created 4d03c9f1ef5f-infra 4d03c9f1ef5f loving_northcutt

sudo podman run -dt --pod loving_northcutt docker.io/library/alpine:latest top

sudo podman ps -a --pod
269ea28c6217 docker.io/library/alpine:latest top 14 seconds ago Up 14 seconds ago strange_hertz 4d03c9f1ef5f loving_northcutt
e14f13b36519 k8s.gcr.io/pause:3.2 3 minutes ago Up 14 seconds ago 4d03c9f1ef5f-infra 4d03c9f1ef5f loving_northcutt

sudo podman pod ps
POD ID NAME STATUS CREATED # OF CONTAINERS INFRA ID
4d03c9f1ef5f loving_northcutt Running 6 minutes ago 2 e14f13b36519

2 containers, it like array for containers

Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 0:42 for /etc/gshadow)

echo user.max_user_namespaces=15076 | sudo tee -a /etc/sysctl.conf
echo 'vit:100000:65536' | sudo tree -a /etc/subuid
echo 'vit:100000:65536' | sudo tee -a /etc/subgid
sudo reboot

sudo podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/ubuntu latest 1e4467b07108 2 weeks ago 76.3 MB