mysql docker creating dump

https://hub.docker.com/_/mysql

create mysql dump:
docker exec CONTAINER_NAME sh -c 'exec mysqldump --all-databases -uUSER_NAME -p"PASSWORD"' > /tmp/all-databases.sql

example:
docker exec mysql-container sh -c 'exec mysqldump --all-databases -uroot -p"testpasswordforroot"' > /tmp/all-databases.sql

restore dump:
docker exec -i CONTAINER_NAME sh -c 'exec mysql -uUSER_NAME -p"PASSWORD"' < /tmp/all-databases.sql

example:
docker exec -i mysql-container sh -c 'exec mysql -uroot -p"testpasswordforroot"' < /tmp/all-databases.sql

SSL certificate with Let’s Encrypt (Certbot) and Docker

I’m going to use certbot/certbot docker container to generate the SSL certificate provided by Let’s Encrypt

docker run -it --rm \
-v /etc/letsencrypt:/etc/letsencrypt \
-v /var/lib/letsencrypt:/var/lib/letsencrypt \
-v PATH_TO_YOUR_WWW_DIRECTORY:/data/letsencrypt \
-v /var/log/letsencrypt:/var/log/letsencrypt \
certbot/certbot \
certonly --webroot \
--email email@example.com --agree-tos --no-eff-email \
--webroot-path=/data/letsencrypt \
-d example.com -d www.example.com