docker¶
see also:
exec as other user (e.G. root)¶
with docker exec
(where ac0
is the container id):
or with docker-compose
(znc is the container name):
docker logs¶
the default json
log can become pretty large if you're running a container for weeks. there are multiple options for logging, to simply use syslog globally for all containers:
create or edit /etc/docker/daemon.json
:
or like this:
changes in the daemon.json
only apply to new containers, not existing.
docker cleanup¶
get rid of exited containers:
get rid of unused images:
docker and ipv6¶
enable ipv6 with docker compose¶
create a new network
to your compose.yaml
and add this network to your container(s), example:
services:
pihole:
image: pihole/pihole:latest
networks:
- leela-network
ports:
- 53:53/tcp
- 53:53/udp
environment:
TZ: Europe/Paris
volumes:
- pihole-etc:/etc/pihole
- pihole-dnsmasq:/etc/dnsmasq.d
restart: unless-stopped
networks:
leela-network:
enable_ipv6: true
the above enables ipv6 and ipv4 for your container
more docker ipv6 stuff¶
this is for your /etc/docker/daemon.json
file. it might not exist.