-
Notifications
You must be signed in to change notification settings - Fork 1
Everything Docker
From the Docker documentation page, "Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production."
Docker Desktop includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper!
- Download Docker for MacOS from Docker Hub.
- Double-click the disk image (dmg) to begin the installation.
- Once finished, drag and drop the Docker app into your
/Applications
folder. - Navigate to your
/Applications
folder (Finder > Go > Applications
). - Locate Docker and double-click to launch.
- If prompted with,
“Docker” is an app downloaded from the Internet. Are you sure you want to open it?"
simply click,open
. - You may be asked to provide administrator privileges to Docker. It is in your best interest to do so.
- If prompted with,
- Done!
You can check the status of Docker Desktop by looking at your menu bar and locating the 🐳 icon. If 🐳 is not present, Docker Desktop is not running.
- Download Docker for Windows from Docker Hub.
- Once the executable has been downloaded, double-click to launch the installation wizard.
- When prompted, check the Enable WSL 2 Windows Features and, optionally Add shortcut to desktop boxes, and hit,
ok
. - The installation wizard will now begin to unpack some files; once this is finished, you must restart Windows.
- After restarting Windows, open up the command prompt and run the command
docker version
.- If Windows is unable to recognize the command, Docker has not been installed correctly. Please carefully review the steps above.
- If after running
docker version
, you notice the error messageerror during connect: ... This error may indicate that the docker daemon is not running
, you need to restart Windows.
- Done!
Due to the variations in package managers/commands for the different Linux distributions, it is best to follow the official installation guide for installing Docker Engine on your Linux machine.
- Locate and navigate to your local copy of the repository. Eg.
cd <folder>/ ... cd 320-S21-Track2/
. - Run the command
docker-compose up
.- Note that this may take a while to complete. If successful, you should see the message "You can now view ethisim in the browser" at the bottom of your terminal.
- Alternatively/Optionally you may want to run
docker-compose up -d
where-d
stands for "detached mode." Detached mode starts the containers in the background and leaves them running.
If you'd like to run the docker containers with hot reloading, run the following command:
docker-compose -f docker-compose-hot-reload.yaml -f docker-compose.yaml up
This is an alternative to running the containers in production mode (ie. running docker-compose up
)
- Hit
Ctrl-C
to gracefully stop the containers.- If running in detached mode, execute the command
docker-compose stop
instead.
- If running in detached mode, execute the command
- (Optional Step) If you only need to stop the Docker services (containers), no further action is required. If you want to rebuild the images or use different images in future builds, you may consider running
docker-compose down
. Consult the documentation for more information ondocker-compose down
.