Difference between revisions of "Docker - Update software of docker container"

(Created page with "Docker containers should not store application data. Application data is saved in Docker volumes. <br> Download the new Docker application software with "pull". Then stop and...")
(No difference)

Revision as of 11:32, 13 October 2019

Docker containers should not store application data. Application data is saved in Docker volumes.
Download the new Docker application software with "pull". Then stop and restart the Docker container.

docker pull mysql
docker stop mysql_container_name 
docker rm mysql_container_name 
docker run --name=mysql_container_name --restart=always \
  -e MYSQL_ROOT_PASSWORD=YOUR_PASSWORD -v /my/data/dir:/var/lib/mysql -d mysql