Skip to content

Instantly share code, notes, and snippets.

@infernalsirius
Last active August 15, 2021 07:20
Show Gist options
  • Save infernalsirius/716ace1d41896c9df579cc86addf17b0 to your computer and use it in GitHub Desktop.
Save infernalsirius/716ace1d41896c9df579cc86addf17b0 to your computer and use it in GitHub Desktop.
[Docker Engine commands ]A few commands to manage Docker Engine #docker
# TODO code a fish function
docker stop (docker ps -a -q)
# 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
# Check docker status on Unraid
/etc/rc.d/rc.docker status
#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.
# Docker daemon configuration
{
"mtu": 1454,
"debug": true,
"registry-mirrors": ["https://registry-mirror.kebekweb.ca"]
}
sudo kill -SIGUSR1 pidofdockerdhere
sudo kill -SIGHUP pidofdockerdhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment