Skip to content

Instantly share code, notes, and snippets.

@andreciornavei
Last active March 31, 2022 10:37
Show Gist options
  • Save andreciornavei/670e5e69bbbb66bf4e93ca871c1b12eb to your computer and use it in GitHub Desktop.
Save andreciornavei/670e5e69bbbb66bf4e93ca871c1b12eb to your computer and use it in GitHub Desktop.
Examples of docker images installation
#instala uma imagem mysql na versão 5.7 atribuindo um volume existente
docker run -d --name mysql --restart always -p 3306:3306 -v mysql-volume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mysql-secret-pw mysql:5.7 --default-authentication-plugin "mysql_native_password"
#instala uma imagem redis na versão alpine atribuindo um volume existente
docker run -d --name redis --restart always -p 6379:6379 -v redis-volume:/var/lib/redis redis:alpine redis-server --requirepass "redis-secret-pw"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment