Docker Basics: Interacting with Containers using Docker Client

docker run hello-world -> "hello-world"
docker run busybox echo “hello world” -> "hello-world"
docker run busyboxy ls -> "bin, dev,etc,proc, root,..."
docker ps -> list the running containers
docker ps — all -> all created container that are running or run once a while will be listed
docker create busybox echo hi there -> run "echo" command on the busybox imagedocker start <ID> -> returns only the container iddocker logs <ID> -> returns the console outputs of the contaier
docker system prune -> remove all container on the system
docker start -a <ID> -> starts the container and returns the container outputs
docker exec -it <container id > <command> -> starts the container along with the command and enables to interact on the container
docker run -it busybox sh -> jumps in the busybox terminal
docker run <image name>
docker run <image name> <command>
docker run hello-world -> "hello-world"
docker run busybox echo “hello world” -> "hello-world"
docker run busyboxy ls -> "bin, dev,etc,proc, root,..."
docker ps
docker run busybox ping www.medium.com
docker ps -all
run = create+start
docker exec -it <container-ID> <command>
docker run redis-server
docker exec -it <ID> redis-cli
docker exec -it <container-ID> sh
docker run -it busybox sh

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Top 10 Mobile Performance Testing Tools in 2020

Building a dynamic AWS Pipeline with CDK

Top 21 Spring Boot Interview Questions

Pineapple Powwow: A Closer Look Into What We’ve Accomplished and What’s To Come

Creating and Understanding A Singleton Pattern

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
cem akpolat

cem akpolat

More from Medium

How to install an SSL certificate on Alpha Five?

DevOps(1): Jenkins installation with docker:

hackpeas, Viraj Vaishnav, veer1024, hacker , devops, devsecops

Docker Introduction

Redis Sentinel implementation for SpringBoot application