You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's easiest to install and use Docker Desktop to perform most operations like start/stop containers, but sometimes using the command line gives you finer control. Below are some commonly-used Docker commands.
Start/Stop development containers
docker-compose [up/down]
List running containers
docker container ls
Restart container (ex: 'wise-client')
docker restart wise-client
Access container's command line (ex: 'wise-client')
docker exec -it wise-client sh
Run 'npm test' in wise-client container
docker exec -it wise-client npm test
Run 'npm test' in wise-client container with the watch option
docker exec -it wise-client npm test -- "--watch=true"
Run 'maven test' in wise-api container
docker exec -it wise-api mvn test
MySQL Docker commands
Connect to MySQL container (password: iamroot)
docker run -it --network wise-docker-dev_default --rm mysql:8 mysql -hwise-mysql -uroot -p
Import data from mysqldump
docker exec -i wise-mysql sh -c 'exec mysql wise_database -uroot -p"$MYSQL_ROOT_PASSWORD"' < ~/path_to/wise_database_dump.sql