I am working on Ubuntu 24 (Noble). Thereon runs a gitlab-runner in root. The gitlab ci pipeline builds and starts podman containers.
My issue is that an nginx container hosting my webpage cannot be stopped and some zombie will live on.
Steps to reproduce (you don’t need a gitlab runner):
Dockerfile:
FROM docker.io/nginx:alpine as ui
# Copy the build output from the previous image
docker-compose.yaml
version: "3"
services:
frontend:
build:
context: .
dockerfile: Dockerfile
ports:
- "127.0.0.1:80:80"
expose:
- "80"
Then run:
sudo podman-compose build
sudo podman-compose up -d
sudo podman-compose down
The last command will not be able to shut down the containers as can be verified in:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
62e8ba97cc19 localhost/ui_frontend:latest nginx -g daemon o... 47 minutes ago Shutting down 12 minutes ago 127.0.0.1:80->80/tcp ui_frontend_1
The resulting container cannot be force removed, the files associated with the container cannot be removed.
When running podman without elevation, I have no issues. What is the best strategy here?
Kind Regards