'Hide portainer container from containers list
Solution 1:[1]
Inside a console, run:
docker pull portainer/portainer-ce:latest && \
echo "FROM portainer/portainer-ce:latest" | docker build --label hidden="true" -t "portainer/portainer-ce:latest" -
This will create a new image of Portainer, with the label hidden="true" applied.
Then, re-install the Portainer's docker container:
docker stop portainer && \
docker rm portainer && \
docker run -d -p 8000:8000 -p 9000:9000 \
--name=portainer --restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data portainer/portainer-ce
Open Portainer at http://localhost:8000, go to "Settings" (bottom left), at the "Hidden containers" section, and add an entry with name=hidden, value=true:
Now the portainer's container won't be visible at the containers list.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |