Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn OpenShift

You're reading from   Learn OpenShift Deploy, build, manage, and migrate applications with OpenShift Origin 3.9

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781788992329
Length 504 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Denis Zuev Denis Zuev
Author Profile Icon Denis Zuev
Denis Zuev
Aleksey Usov Aleksey Usov
Author Profile Icon Aleksey Usov
Aleksey Usov
Artemii Kropachev Artemii Kropachev
Author Profile Icon Artemii Kropachev
Artemii Kropachev
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Containers and Docker Overview FREE CHAPTER 2. Kubernetes Overview 3. CRI-O Overview 4. OpenShift Overview 5. Building an OpenShift Lab 6. OpenShift Installation 7. Managing Persistent Storage 8. Core OpenShift Concepts 9. Advanced OpenShift Concepts 10. Security in OpenShift 11. Managing OpenShift Networking 12. Deploying Simple Applications in OpenShift 13. Deploying Multi-Tier Applications Using Templates 14. Building Application Images from Dockerfile 15. Building PHP Applications from Source Code 16. Building a Multi-Tier Application from Source Code 17. CI/CD Pipelines in OpenShift 18. OpenShift HA Architecture Overview 19. OpenShift HA Design for Single and Multiple DCs 20. Network Design for OpenShift HA 21. What is New in OpenShift 3.9? 22. Assessments 23. Other Books You May Enjoy

Using the Docker command line

In order to start using Docker CLI, you need to configure and bring up a Vagrant VM. If you are using macOS, the configuration process using Vagrant will look like this:

$ mkdir vagrant; cd vagrant
$ cat Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.hostname = 'node1.example.com'
config.vm.network "private_network", type: "dhcp"
config.vm.provision "shell", inline: "groupadd docker; usermod -aG docker vagrant; yum install docker -y; systemctl enable docker; systemctl start docker"
end
$ vagrant up
$ vagrant ssh

Using Docker man, help, info

The Docker daemon listens on unix:///var/run/docker.sock but you can bind Docker to another host/port or a Unix socket. The Docker client (the docker utility) uses the Docker API to interact with the Docker daemon.

The Docker client supports dozens of commands, each with numerous options, so an attempt to list them all would just result in a copy of the CLI reference from the official documentation. Instead, we will provide you with the most useful subsets of commands to get you up and running.

You can always check available man pages for all Docker sub-commands using:

$ man -k docker

You will be able to see a list of man pages for Docker and all the sub-commands available:

$ man docker
$ man docker-info
$ man Dockerfile

Another way to get information regarding a command is to use docker COMMAND --help:

# docker info --help
Usage: docker info
Display system-wide information
--help Print usage

The docker utility allows you to manage container infrastructure. All sub-commands can be grouped as follows:

Activity type

Related subcommands

Managing images

search, pull, push, rmi, images, tag, export, import, load, save

Managing containers

run, exec, ps, kill, stop, start

Building custom images

build, commit

Information gathering

info, inspect

You have been reading a chapter from
Learn OpenShift
Published in: Jul 2018
Publisher: Packt
ISBN-13: 9781788992329
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime