On Ubuntu's fresh server with pre-installed Docker, When the server boots, the "docker images" command displays erichough/kodi image.
$ sudo docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
erichough/kodi latest ede3f836a76c 5 weeks ago 554MB
The "docker ps" command displays no ps.
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$
But in this moment there is "gitlab/gitlab-ce" running container that i can use it's services.
The sudo docker container ls -a
command sho:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0026317ebf3a gitlab/gitlab-ce:latest "/assets/wrapper" 3 hours ago Up About a minute (health: starting) 0.0.0.0:80->80/tcp, 0.0.0.0:99->99/tcp, 22/tcp, 0.0.0.0:443->443/tcp mygit
3bd3725ac1c1 gitlab/gitlab-ce:latest "/assets/wrapper" 47 hours ago Created gitlab
4ccc43a8f047 cozy/full "/usr/local/bin/supe…" 6 days ago Created confident_varahamihira
a50451e519a1 cozy/full "/usr/local/bin/supe…" 6 days ago Created sharp_curran
76fbaf259b4c cozy/full "/usr/local/bin/supe…" 6 days ago Created quirky_bassi
c48667761038 cozy/full "/usr/local/bin/supe…" 6 days ago Created frosty_lederberg
218a7ce0bcd3 cozy/full "/usr/local/bin/supe…" 6 days ago Exited (255) 6 days ago 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp peaceful_edison
When I restart the Docker service, the list of images changes.
$ sudo systemctl restart docker
$
$ sudo docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
gitlab/gitlab-ce latest e6b464b98aff 10 days ago 1.92GB
cozy/full latest 6579394e9b4f 2 years ago 1.25GB
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bba08cdc44ee gitlab/gitlab-ce:latest "/assets/wrapper" 42 hours ago Up About a minute (health: starting) 0.0.0.0:80->80/tcp, 0.0.0.0:99->99/tcp, 22/tcp, 0.0.0.0:443->443/tcp mygit
In this new list, I can see image of container that was running in the past. Why did this happen and how can I merge the two lists?
docker container ls -a
show before the restart?docker container inspect bba08cdc44ee
docker container ls -a
show before the restart?" does add.docker container inspect bba08cdc44ee
" is:Error: No such container: bba08cdc44ee