Skip to content

Instantly share code, notes, and snippets.

View neo0910's full-sized avatar

den neo0910

View GitHub Profile
neo0910 / docker-compose.yml
Created March 28, 2020 22:54
Docker compose file for the mongo container
version: '3.7'
container_name: [name]
image: mongo
restart: unless-stopped
- 27017:27017
neo0910 / enter to container
Created March 28, 2020 22:51
How to enter to running docker container
docker exec -it [container-id] bash
docker exec -i your_container mysqldump -uyour_user -pyour_password --databases database_name --skip-comments > /path/to/my/dump.sql
neo0910 / start local mongo container
Last active March 28, 2020 22:56
Run local mongo docker container
docker run -d --name [name] -p 27017:27017 mongo
// set password
docker run -d --name yourcustomname -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=mySchema mysql:5.7
// or without password
docker run -d --name yourcustomname -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=mySchema mysql:5.7