Click the docker-for-mac icon
Launch container (-d: Launch in background)
--Docker-compose.yml moves to a certain hierarchy
docker-compose up -d
Enter the container
```docker-compose exec service name
/bin/bash````
Example
docker-compose exec web /bin/bash
Exit from service
exit
Check the currently running service to determine which service (container) to end.
docker ps
Stop service (container) (= end) * If you compare it with vagrant, vagrant halt
docker stop `container id`
Example
docker stop 5efheiwoe
Check all the containers created
docker ps -a
--Delete the container you no longer need docker rm -f` CONTAINER ID`
b. Check all created images
docker images
--Delete images you no longer need docker rmi -f` IMAGE ID`
rails new
rails new folder name --database = postgresql
config/database.yml
default: &default
adapter: postgresql
encoding: unicode
host: db
username: postgres
password: password
pool: 5
rails db:create
---- Start work! !! !! !! ----
Recommended Posts