1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-18 20:41:29 +02:00

Improve wording/typos

This commit is contained in:
Marcel Ribeiro Dantas
2022-11-13 12:59:50 -03:00
committed by GitHub
parent f0577fb679
commit 5630c3e05a

View File

@@ -69,13 +69,13 @@ in a limited capacity architecture.
</pre>
Couple of terms we will encounter frequently are Docker Images and Docker
Containers. Images are packages or templates of containers all stored in the
[Docker Hub](https://hub.docker.com/). Containers are standalone, executable
instances of these images which include code, runtime, system tools, system
libraries and settings - everything required to get the software up and running.
Coming to Docker, it follows a client-server architecture wherein the CLI client
communicates with the server component, which here is, the Docker Engine using
RESTful API to issue commands.
Containers. Images are packages or templates of containers all stored in a
container registry such as [Docker Hub](https://hub.docker.com/). Containers
are standalone, executable instances of these images which include code,
runtime, system tools, system libraries and settings - everything required to
get the software up and running. Coming to Docker, it follows a client-server
architecture wherein the CLI client communicates with the server component,
which here is, the Docker Engine using RESTful API to issue commands.
## The Docker CLI
```bash
@@ -109,9 +109,9 @@ $docker
$ docker run hello-world
# `docker run <container-name>` is used to run a container, it will pull the
# images from Docker Hub if they don't alrady exist on your system. Here the
# images from Docker Hub if they don't already exist in your system. Here the
# docker client connects to the daemon which in turn pulls the "hello-world"
# image from the Docker Hub. The daemon then creates a new container from the
# image from the Docker Hub. The daemon then builds a new container from the
# image which runs the executable that produces the output streamed back to the
# client that we see on our terminals.
@@ -129,7 +129,9 @@ $docker run <container-id> -p 3000:8000
# runs in isolation, hence the port 8000 where the app runs is private to the
# container.
$docker run -i or $docker run -it
$ docker run -i
# or
$ docker run -it
# Docker runs our containers in a non-interactive mode i.e. they do not accept
# inputs or work dynamically while running. The -i flag keeps input open to the
# container, and the -t flag creates a pseudo-terminal that the shell can attach
@@ -143,10 +145,12 @@ $docker ps -a
# 82f84bf6912b hello-world "/hello" 9 minutes ago Exited (0) 9 minutes ago eloquent_sammet
$docker start hello-world or $docker stop hello-world
# The stop command simply stops one or more containers, the start command starts
# the conatainer(s) up again! `docker start -a ubuntu` will attach our detached
# container back to the terminal i.e. runs in the foreground
$ docker stop hello-world
# or
$ docker start hello-world
# The stop command simply stops one or more containers, and the start command
# starts the container(s) up again! `docker start -a ubuntu` will attach our
# detached container back to the terminal i.e. runs in the foreground
$ docker create alpine
# `docker create` creates a new container for us with the image specified (here,
@@ -181,7 +185,7 @@ $docker pull busybox
$ docker exec -it 7b272 bash
# This command is used to run a command in the running container's default
# directory. Here 7b272 was our ubuntu container and the above command would
# help us interact with the container by opening a bash session
# help us interact with the container by opening a bash session.
$ docker compose