Docker
Table of Contents
1. Compose
Docker image can be set up by writing docker-compose.yml file.
docker compose(ordocker-compose)upcreate and start containers-d,--detachrun container in the background
2. Maintenance
2.1. CLI tool
docker ps- List all containers
docker exec-urun as user within the container-irun inside this image
Example of removing all users that starts with a in a Gitea container.
docker exec -u harry -i gitea sh -c '
gitea admin user list | awk "{print \$2}" | grep "^a" | while read -r u; do
echo "Delete $u"; gitea admin user delete --username "$u" --purge ;
done'