Last active
September 16, 2022 08:03
-
-
Save MartinLuksik/294dc50d1385543271b3d2d296da3646 to your computer and use it in GitHub Desktop.
[Docker] Docker #docker #dns $
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bind server with wildcard record | |
docker run -d -e WILDCARD_DNS='luksa=192.168.0.153' -p 80:53/udp martindocker22/bind:latest | |
# clean up disk with cron | |
#!/bin/bash | |
set -o xtrace | |
sudo sh -c ' | |
cat << EOF > /etc/cron.d/docker_image_prune | |
0 2 * * * vsts /usr/bin/docker rm $(/usr/bin/docker ps --filter status=exited -q) > /tmp/docker_rm.log 2>&1 | |
5 2 * * * vsts /usr/bin/docker image prune -a --force --filter "until=24h" > /tmp/docker_prune.log 2>&1 | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment