- Install Docker for Mac
- Clone this repository (and any others you want to access) to
~/dev/code
- Navigate to
~/dev/code/dev-environment
- Run
docker-compose up -d
- Enter the
devenv
container viadocker exec -it devenv bash
- Install repo dependencies:
- navigate to a repo directory via
cd /dev/code/my-repo
- run
bundle
,yarn install
, etc as you normally would for your project
- navigate to a repo directory via
- Start your server(s)
You can delete this setup and start from scratch by running the Docker delete commands listed below, which will remove all images and containers.
docker-compose up -d
: Create and start containersdocker-compose stop
: Stop servicesdocker-compose restart
: Restart servicesdocker ps
: List running containersdocker ps -a
: List all containersdocker run -it [image name]
: Run a container and interact with itdocker exec <container> rake db:migrate
: Run db migration for a particular containerdocker rm $(docker ps -aq)
: Delete all docker containersdocker rmi $(docker images -aq)
: Delete all docker images