Docker Api or Agent

So, I have installed Docker on LCX with Debian 11 then add Portainer…all is good. Now, there is a Portainer upgrade which led to my question in the subject: is Docker an API or Agent, here?

;

That’s a question about Portainer functionality :slight_smile: It is not really about Docker.
Their documentation covers the topic: Add a Docker Standalone environment - Portainer Documentation

It depends on whether you run a single docker host, multiple local docker hosts (standalone/swarm cluster), or remote docker hosts.

  • With a single docker host → use the socket
  • If you want to add another docker host in the same network (same applies to swarm nodes) → use the Agent
  • If you want to add another docker host tn a remote location → use Edge Agent

API would mean you specific configure a tcp binding for the docker engine. It is not configured by default and can be a huge security risk, if not combined with certificate based client authentication. Without certificate based client authentication, everyone that can reach your tcp endpoint can control your docker engine without restrictions.

Thank you Meyay for your great info. I am glad because I planned to run three or four Docker containers: a DNS server,a NTP/GPS server, a syslog server, and auto-GPT; so, I’ll have a swarm

However, I am confused with Portainer as I am following the upgrade here: Upgrading on Docker Standalone - Portainer Documentation but whenever I run the command Docker stop Portainer, I get not a valid command…that was what led me to post here regarding the API or agent…what’s up with that command issue?

Did you really use uppercase D and P? The command must be lowercase.

What is the exact error message?

Do you mean Docker Swarm? Then docker stop will most likely not work. Swarm will make sure your containers are running. Or did you just use the word “swarm” to indicate you will have more than one containers?

I had copied and paste the commands found here: Upgrading on Docker Standalone - Portainer Documentation
I am not at home until Sunday to show the exact response from bash but I believe it was command not found.

I have not setup any thing other than the LXC with Debian 11, installed Docker and added Portainer; however, based on my plan to have a few containers that’s why I said I’ll have a swam

I had the impression that once I set up a Docker, I can easily add more containers…I am sort of new to Docker despite installing it on my MacBook pro since 2018 but never got around to play with it.

Earlier this year, I bought a Dell Precision 3630MT and installed Proxmox, pfSense, and now Docker for a on premises private cloud - home office/lab.

Then the reason could be what I wrote

Here is what I wrote and other to test few command…

Hello Meyay, I have placed a screen shot with the command I had ran…can you see please?

Can you tell me why you think “stop portainer” should work instead of giving you “command not found”?

docker stop portainer will work only if the name of the container is portainer. Run docker container ls to see the list of containers.

Here is what was listed…I didn’t realized it install as container?

Please, use </> button to share codes, terminal outputs, error messages instead of sharing screenshots. That helps others to search for similar issues and us to read it more easily and quote parts of the message so we can help you more quickly. You can find a complete guide in the following post: https://forums.docker.com/t/how-to-format-your-forum-posts/127295https://forums.docker.com/t/docker-api-or-agent/136782/8

This should work

docker stop hardcore_poitras

How did you install it then? I don’t use portainer so I don’t know. Is there an apt install portainer command or something like that?

docker run --restart always -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

<root@nollidocka:~# docker rm portainer
Error response from daemon: No such container: portainer
root@nollidocka:~# docker stop hardcore_poitras
hardcore_poitras
root@nollidocka:~# rm hardcore_poitras
rm: cannot remove ‘hardcore_poitras’: No such file or directory
root@nollidocka:~# />

<root@nollidocka:~# docker rm portainer
Error response from daemon: No such container: portainer
root@nollidocka:~# docker stop hardcore_poitras
hardcore_poitras
root@nollidocka:~# rm hardcore_poitras
rm: cannot remove ‘hardcore_poitras’: No such file or directory
root@nollidocka:~# docker rm hardcore_poitras
hardcore_poitras
root@nollidocka:~# docker pull portainer/portainer-ee:latest
latest: Pulling from portainer/portainer-ee
772227786281: Already exists
96fd13befc87: Already exists
5171176db7f2: Already exists
a143fdc4fa02: Already exists
b622730c7bdc: Already exists
c1cad9f5200f: Pull complete
69ae32ddde08: Pull complete
4a0d116cdc71: Pull complete
08962690b30c: Pull complete
78e44cf728cd: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:656ca138b68f9aaafd0923ad85e89e84d0be7001faa6ff2c9155bbdab0527ae4
Status: Downloaded newer image for portainer/portainer-ee:latest
docker.io/portainer/portainer-ee:latest
root@nollidocka:~# />

Thank you now it’s properly named :sunglasses:

You used the docker command to run portainer and you say you

I’m completely lost. Also I have no idea what you were doing in your other comments here. You successfully removed portainer then tried to stop it and used a filesystem command “rm”. Please think about what you are doing because it doesn’t make sense. Not knowing something is fine, but if you start to run commands randomly there is a pretty good chance you will break your host operating system as well and lose data.

Good to read good news!, but please dont forget about code blocks after you perfetly used it in one post :slight_smile: Thank you.

update:

I didn’t realize before why you wrote “properly named”, but you actually just pulled the latest version of a portainer image and that is not even the community edition but the enterprise edition.

@nolli may I suggest to start with a Docker getting started guide, to actually build up some basic understanding about how things work?

If you really want to learn Docker, I can highly recommend this free self-paced training: Introduction to Containers

It should provide a solid foundation about docker concepts and how things are done with docker. Once you understand these things, you should be able to apply them to Portainer as well. Without understanding the concepts, things can be very time-consuming and frustrating.

Thank you… :heart_eyes: