You need Docker and Docker Compose. For that, you have several options:
-
Install Docker in your local machine (recommended)
- https://docs.docker.com/get-docker/
- On a Linux system, you need to manually install Docker Compose: https://docs.docker.com/compose/install/
-
Use an online Docker playground
- Navigate to https://labs.play-with-docker.com/
- You need to Login with a Docker Hub account. If you don't have one, you can create it easily from here
- Click on "Start"
- Click on "Add new instance" (the instance will be alive for 4 hours)
- There you can write any Docker or Docker Compose command as you would do it from you local machine.
- We would recommend you to upload this repository to you playground instance:
- From the playground instance terminal:
wget https://github.com/CodiumTeam/docker-training/archive/refs/heads/master.zip && unzip master.zip
- The previous command creates a folder named
docker-training-master
that contains all the resources of this repository.
- From the playground instance terminal:
- In case you need it, you can upload any file or folder from your local machine to your playground instance:
- To copy a file:
scp [your-filename] [your-instance-id]@direct.labs.play-with-docker.com:/root
- To copy a folder recursively:
scp -r [your-folder] [your-instance-id]@direct.labs.play-with-docker.com:/root
- To copy a file:
To avoid delays while doing the exercises you can prefetch all docker images running pull-images.sh script.
If you want to pull only the images related with a specific exercise, open the script and copy and paste the required images.
- Exercise 1: hello world
- Exercise 2: basic commands
- Exercise 3: ports, envs and volumes
- Exercise 4: Docker Compose
- Exercise 5: build your own image
- Exercise 6: building more efficient images
- Exercise 7: using Docker in your development environment
- Exercise 8: publish your own image
- Exercise 9: troubleshooting
- Exercise 10: clean up the system
- Exercise 11: security
- Exercise 12: pipelines