Lab7.1 - Issues running "docker container ls"
Hi all,
I'm on Lab 7.1 , I have "Docker version 20.10.6-ce, build 8728dd246c3a" installed on OpenSuse.
The thing I'm seeing is if I run "docker container ls" I get nothing back.
If I run "docker container ls -a" then I see all my containers. Why would that be?
Comments
-
Hi @PeterCharuza,
The output difference between the
docker container lsanddocker container ls -acommands is an expected behavior of Docker. You may run thedocker container ls --helpcommand or visit the docker command-line reference for thecontainer lscommand for a list of accepted options with their respective descriptions.While
lsonly lists running containers, the-aoption lists all containers.Regards,
-Chris0 -
Hi @chrispokorni, I think that's what is bothering me. All containers are running but still only show up with ls -a.
0 -
0
-
sudo zypper install docker python3-docker-compose python3
0 -
It's not unworkable, but it's not working as stated in the Linux Foundation course work or anything else I see online.
For the sake of learning and completeness I figured I'd follow up and see if this is a known issue or something I'm doing wrong. It looks like it's just the wonky setup.
Note: I don't necessarily think it's OpenSuse's fault, that is a good OS. I should just move back to VMware, I was running OpenSuse because that's the only thing that will actually boot on this older IBM ThinkCenter desktop I got for free. I'll have to think of some better way to utilize it, it's not really rocking the whole docker thing.
Manufacturer: LENOVO
Product Name: 0967B4U
Version: ThinkCentre M72e
Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz0 -
How funny, I moved over to KDE Neon which is Ubuntu 20.04, installed the latest Docker (it was a breeze to setup) and I see the same results. When running docker container ls I get no output.
pch@docker:~/.ssh$ sudo docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESpch@docker:~/.ssh$ sudo docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0f3b19346f28 alpine "sh" 44 seconds ago Exited (130) 10 seconds ago myalpinedocker -v
Docker version 20.10.8, build 3967b7d
0 -
Hi @PeterCharuza,
From what I can see, the
lsandls -acommands behave as expected.Your container is in
Exitedstate, no longer a running container, hence only displayed by thels -acommand. If it were a running container, it would be displayed by thelscommand as well.Regards,
-Chris0 -
ah ok. Thanks for that
I figured it was something I was overlooking.0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 755 Linux Foundation IT Professional Programs
- 375 Cloud Engineer IT Professional Program
- 170 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 5 DevOps & GitOps IT Professional Program
- 100 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 2 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 5 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 2 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 795 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 90 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 112 Mobile Computing
- 20 Android
- 77 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 393 Off Topic
- 121 Introductions
- 182 Small Talk
- 29 Study Material
- 980 Programming and Development
- 310 Kernel Development
- 652 Software Development
- 995 Software
- 387 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)