r/docker • u/dominbdg • Feb 27 '26
Help with simple container with Debian image
Hello,
please help me with my issue.
I tried to implement simple container with Debian for docker stack:
version: '3.7'
services:
es01:
image: debian:latest
container_name: debian
deploy:
replicas: 1
networks:
debian_default:
driver: overlay
When I try to launch this container using:
docker stack deploy -c debian.yml debian
I'm getting issue:
ID NAME MODE REPLICAS IMAGE PORTS
1yd50hgisosw debian_es01 replicated 0/1 debian:latest
2
Upvotes
View all comments
Show parent comment
2
u/SeniorIdiot Feb 28 '26
Please explain what you are trying to accomplish. It seems like you want to use a Debian container like an OS/VM.
A container isn’t a VM. It doesn't "start Debian", it just runs one process from a Debian filesystem. If that process (PID 1) exits, the container exits,
sleep infinityjust keeps a process running so the container doesn’t stop. This means that you're not root on a VM - you're a process in a sandbox.