/docker-samples

Samples used to setup Docker-based environments

Primary LanguageDockerfileMIT LicenseMIT

docker-samples

A project with custom & ready-to-use Docker images.

MySQL/MariaDB

  1. Alpine with periodic backup: minimal MariaDB server with a daily backup schedule | reference guide: MySQL/MariaDB with scheduled backups running in Docker @ Medium.

command demo:

docker run -d \
     --name=mysql-backup \
     --restart=always \
     -v /etc/localtime:/etc/localtime:ro \
     -v /path:/opt/mysql/backup \
     -e MYSQL_CONTAINER_NAME=127.0.0.1 \
     -e MYSQL_DATABASE=DATABASE \
     -e MYSQL_ROOT_PASSWORD=PASSWORD \
     -u root \
     mysql_auto_backup \
     crond -f -d 8

Nginx

  1. Alpine with logs saved in custom paths: minimal Nginx server with error.log and access.log stored in custom paths.

  2. Alpine listening in custom port: minimal Nginx server listening on port 8080.