docker-compose build #Creating a container
docker-compose up #Container launch
docker-compose down #Container down ctrl+It can be stopped with c, but server.Error with pid
docker-compose stop #Stop container
docker-compose up --build #Reboot the server after reflecting the changes in docker related files
docker images #Image list
docker ps #List of moving containers
docker ps -a #List including non-moving containers
docker rm `docker ps -a -q` #Bulk deletion of containers
docker rmi `docker images -a -q` #Bulk delete images
mysql -u root -p -h localhost -P 3306 --protocol=tcp #From Docker to MYSQL
docker-compose run web bundle install #bundle install
docker-compose run web rails db:create #db creation
docker-compose run web rails db:migrate #My Great
These are the commands I often use in Rails and Docker! I hope you find it helpful. If you make a mistake, please point it out.
Recommended Posts