Last active
August 15, 2021 07:20
-
-
Save infernalsirius/716ace1d41896c9df579cc86addf17b0 to your computer and use it in GitHub Desktop.
[Docker Engine commands ]A few commands to manage Docker Engine #docker
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
# TODO code a fish function | |
docker stop (docker ps -a -q) | |
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
# Run CPU performance test | |
docker run --rm -v /mnt/cache/Data/Benchmark:/root/results ljishen/sysbench /root/results/output_cpu.prof --test=cpu --cpu-max-prime=20000 run | |
# Run Memory functions speed test | |
docker run --rm -v /mnt/cache/Data/Benchmark:/root/results ljishen/sysbench /root/results/output_memory.prof --test=memory run | |
# Run File I/O test | |
docker run --rm -v /mnt/cache/Data/Benchmark/workdir:/root/workdir ljishen/sysbench /root/results/output_fileio.prof --test=fileio --file-num=64 prepare | |
docker run --rm -v /mnt/cache/Data/Benchmark:/root/results -v /mnt/cache/Data/Benchmark/workdir:/root/workdir ljishen/sysbench /root/results/output_fileio.prof --test=fileio --file-num=64 --file-test-mode=seqrewr run | |
docker run --rm -v /mnt/cache/Data/Benchmark/workdir:/root/workdir ljishen/sysbench /root/results/output_fileio.prof --test=fileio cleanup | |
rm -r workdir | |
# Print help message | |
docker run --rm ljishen/sysbench /root/results/output_help.prof help |
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
# Check docker status on Unraid | |
/etc/rc.d/rc.docker status |
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
#Solving the problem (docker-compose) | |
#If you work with docker-compose, you will notice that in containers created by docker-compose, the MTU of the daemon is not inherited. This happens because the mtu entry in /etc/docker/daemon.json file only affects the default bridge. Therefore you have to specify the MTU explicitly in the docker-compose.yml for the newly created network: | |
... | |
networks: | |
default: | |
driver: bridge | |
driver_opts: | |
com.docker.network.driver.mtu: 1454 | |
# After rebuilding the docker-compose environment (docker-compose down; docker-compose up), the containers should use the modified MTU. |
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
# Docker daemon configuration | |
{ | |
"mtu": 1454, | |
"debug": true, | |
"registry-mirrors": ["https://registry-mirror.kebekweb.ca"] | |
} |
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
sudo kill -SIGUSR1 pidofdockerdhere |
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
sudo kill -SIGHUP pidofdockerdhere |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment