This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -p 5432:5432 --name some-postgres -e PGDATA=/var/lib/postgresql/pgdata -e POSTGRES_PASSWORD=MyPa@@W0rd -d postgres | |
populate the database ... | |
docker commit some-postgres myAccount/repo-name:1.0 | |
make sure the data is now persisted in the new image | |
docker run -p 5432:5432 --name persistent-postgres -d myAccount/repo-name:1.0 | |
docker login -u myAccount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MySQL | |
docker run -p 3306:3306 --name some-mysql -e MYSQL_ROOT_PASSWORD=yousafzai -d mysql | |
sudo docker inspect some-mysql | |
docker exec -it some-mysql bash | |
mysql --password | |
create database db_example; | |
create user 'springuser'@'%' identified by 'ThePassword'; | |
grant all on db_example.* to 'springuser'@'%'; | |
// Postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clone a remote repository on your local machine | |
``` | |
git clone <repository_url> | |
``` | |
List all local branches | |
``` | |
git branch | |
``` |