0% found this document useful (0 votes)
2 views

5 - Getting Docker Help from the Command Line

This document provides an overview of how to get help with Docker commands on the command line, including the organization of commands into common and management groups. It explains core concepts such as images and containers, detailing how to view and use various commands associated with them. The document serves as a guide for users to familiarize themselves with Docker's command structure and functionalities.

Uploaded by

asifzea7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

5 - Getting Docker Help from the Command Line

This document provides an overview of how to get help with Docker commands on the command line, including the organization of commands into common and management groups. It explains core concepts such as images and containers, detailing how to view and use various commands associated with them. The document serves as a guide for users to familiarize themselves with Docker's command structure and functionalities.

Uploaded by

asifzea7
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Menu Browse Library Search in our library...

Training Library / Getting Started with Docker on Linux for AWS

Getting Docker Help from the Command 1h 41m 26s left


Line

Open Cloud Environment


100%
Setup completed Introduction
Average setup time: 3m 49s
In this lab step, you will learn about how Docker commands are organized
and how to get help for commands on the command line. If you are familiar
Credentials with using the Linux command line or the git version control system, you
will find many of the commands familiar in name and action. Even if you
Account ID
aren't familiar, the commands are organized in an intuitive way that makes
753705587437 learning to use Docker commands as painless as practicable.

Username
The commands are organized into common commands and a more
exhaustive list grouped around the management of a specific component
student of Docker. You use each with a different syntax. For a common command,
the usage is:
Password
Copy code
Ca1_VRjAKmFO
1 docker command-name [options]

Region and the usage for a management group command is:


US West 2 Copy code

PEM PPK 1 docker management-group command-name [options]

Download Download
Most of the common commands can be accessed in the short form or by
Bridge Connection specifying the management grouping they also fall under. Some commands
100% Completed are only available by specifying the management group. You will get the
hang of this and review a couple of the main concepts in the following
instructions.

Lab steps
Instructions
1 Logging In to the Amazon
Web Services Console 1. To see a list of the commands in Docker, simply enter:
Copy code
2 Connecting to the Virtual
Machine using EC2 1 docker --help

Instance Connect
The management commands and common commands are highlighted in
the image below:
3 Installing Docker on
Amazon Linux

4 Using Docker without Root


Permission on Linux
5 Getting Docker Help from
Menu Line
the Command Browse Library

6 Running Your First Docker


Container

7 Creating Your First Docker


Image

Need help? Contact our support team

2. Enter the following management command:


Copy code

1 docker system info

The output should look familiar. That is because info is a common


command that you used in the last Lab Step (docker info) to see the
same system-wide information.

3. To see all of the commands grouped under system, enter:


Copy code

1 docker system --help

You will be presented with output similar to:

Notice the info command previously entered. events is a common


command, but df and prune are only available through the system
management command. You can use df to see the disk usage for Docker
and prune to clean up unused data.
Using the --help you can explore everything there is to know about
Docker commands. To prepare for the upcoming Lab Steps, you will now
focus in on a few important components.

4. To view the commands grouped with images, enter:


Copy code
1 docker image --help
Menu Browse Library

Images are read-only snapshots that containers can be created from.


Images are built up in layers, one image built on top of another. Because
each layer is read-only, they can be identified with cryptographic hash
values computed from the bytes of the data. Layers can be shared between
images as another benefit of being read-only. You can, and will later, build
your own images. The build command accomplishes that. When you build
your own image, you will select a base image to build on top of with your
custom application. A pull can be used to pull or download an image to
your server from an image registry, while push can upload an image to a
registry. Read through the other command descriptions so you are aware of
what else is available.

5. To view the commands grouped with containers, enter:


Copy code

1 docker container --help

A container is another core concept in Docker. Containers run applications


or services, almost always just one per container. Containers run on top of
an image. In terms of storage, a container is like another layer on top of the
image, but the layer is writable instead of read-only. You can have many
containers using the same image. Each will use the same read-only image
and have its own writable layer on top. Containers can be used to create
images using the commit command, essentially converting the writable
layer to a read-only layer in an image.
The relationship between images and containers aside, run is used to run a
command on top of an image. A container can be stopped and started
again. ls is used to list containers. It is aliased to ps and list as well. Read
through the other commands in the list to see what else is available for
Menu working
Browse with containers.
Library

Summary
In this lab step, you observed the command layout used by Docker. You
also reviewed the core Docker concepts of images and containers as well
as frequently used commands for each. You will see these commands in
action in the following lab steps.

Did you like this End


Back Next Step
step? Lab

ABOUT US COMMUNITY HELP


About QA Join Discord Channel Help Center

Legal & Privacy Sitemap System Status Manage your cookies


Copyright © 2024 QA. All rights reserved.

You might also like