Tutorial by Examples

Data-only containers are obsolete and are now considered an anti-pattern! In the days of yore, before Docker's volume subcommand, and before it was possible to create named volumes, Docker deleted volumes when there were no more references to them in any containers. Data-only containers are obsolet...
docker run -d --name "mysql-1" -v "/var/lib/mysql" mysql This command creates a new container from the mysql image. It also creates a new data volume, which it then mounts in the container at /var/lib/mysql. This volume helps any data inside of it persist beyond the lifetime o...

Page 1 of 1