Fun with Docker
Is installing docker in your machine stopping you from trying docker?
Are you looking for docker hands-on but restricted by following:
- Office laptops not allowing Docker Desktop installation
- Don’t want to over-load your personal laptop
- Just want to see the power of docker and planning to deploy to your personal machine once comfortable
If yes, this article is for you. So, let’s get started.
Without any fuss, all you need to have is “Internet Connection” and “Docker ID”. Go to the below link which will take you to Docker Playground.
Once you are able to login you will see the below screen. You just need to click on start button.
From here, you can create multiple instances. Let’s create one by clicking on “Add New Instance”.
Hurray!! We are now having superfast docker instance up and running. Now you can try out all the docker commands from here and even run docker images.
Trying out Docker commands
- docker version — This command will tell the version of the docker available.
** Bonus — Alt+Enter will make the CLI in full screen.
2. docker pull — This command will pull the docker image from docker container registry.
3. docker images — This will list all the images available in your local repository.
4. docker run — With this command we can run the docker image locally.
Here, you can few flags:
- -p 8080:7080 — This is for port mapping where container port is exposed to host port. You can see the port number which is opened as a hyperlink.
- -d — This is for running the containers in the background.
5. docker container ls — If you want to list your containers.
6. docker logs <container ID/ Name>— You can use this command if you want to check the logs for the container.
Summary
We have learnt about docker playground, how to start the session, create instances and trying out commonly used docker commands.
Happy Reading!!
Here is the YT video if you want to see it in action.