NAME DESCRIPTION STARS OFFICIAL AUTOMATED In the output, you should see the following message, which indicates that Docker is working correctly:
To check whether you can access and download images from Docker Hub, type: Anybody can build and host their Docker images on Docker Hub, so most applications and Linux distributions you’ll need to run Docker containers have images that are hosted on Docker Hub. By default, it pulls these images from Docker Hub, a Docker registry managed by Docker, the company behind the Docker project. To view system-wide information about Docker, use:ĭocker containers are run from Docker images. To view the switches available to a specific command, type: Wait Block until one or more containers stop, then print their exit codes Version Show the Docker version information
Update Update configuration of one or more containers Unpause Unpause all processes within one or more containers Top Display the running processes of a container Tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE Stats Display a live stream of container(s) resource usage statistics Start Start one or more stopped containers
Save Save one or more images to a tar archive (streamed to STDOUT by default) Push Push an image or a repository to a registry Pull Pull an image or a repository from a registry Port List port mappings or a specific mapping for the container Pause Pause all processes within one or more containers Load Load an image from a tar archive or STDIN Inspect Return low-level information on Docker objects Import Import the contents from a tarball to create a filesystem image If you attempt to run the docker command without prefixing it with sudo or without being in the docker group, you’ll get an output like this:Īttach Attach local standard input, output, and error streams to a running containerĬommit Create a new image from a container's changesĬp Copy files/folders between a container and the local filesystemĭiff Inspect changes to files or directories on a container's filesystemĮvents Get real time events from the serverĮxec Run a command in a running containerĮxport Export a container's filesystem as a tar archive It can also be run by a user in the docker group, which is automatically created during the installation of Docker. Step 2 - Executing the Docker Command Without Sudo (Optional)īy default, running the docker command requires root privileges - that is, you have to prefix the command with sudo.
We’ll explore how to use the docker command later in this tutorial.
Installing Docker now gives you not just the Docker service (daemon) but also the docker command line utility, or the Docker client. └─13421 docker-containerd -config /var/run/docker/containerd/containerd.toml Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (running) since Thu 20:28:23 UTC 35s ago rvice - Docker Application Container Engine.You should see output similar to the follow:
Make sure you are about to install from the Docker repo instead of the default Ubuntu 16.04 repo: Next, update the package database with the Docker packages from the newly added repo: sudo add-apt-repository "deb $(lsb_release -cs) stable".This section shows you how to do just that.įirst, in order to ensure the downloads are valid, add the GPG key for the official Docker repository to your system:Īdd the Docker repository to APT sources: To get this latest version, install Docker from the official Docker repository. The Docker installation package available in the official Ubuntu 16.04 repository may not be the latest version. An account on Docker Hub if you wish to create your own images and push them to Docker Hub, as shown in Steps 7 and 8.One Ubuntu 16.04 server set up with a non-root user with sudo privileges and a basic firewall, as explained in the Initial Setup Guide for Ubuntu 16.04.To follow this tutorial, you will need the following: In this tutorial, you’ll learn how to install and use it on an existing installation of Ubuntu 16.04. The other involves spinning up a server with a tool called Docker Machine that auto-installs Docker on it. One method involves installing it on an existing installation of the operating system. There are two methods for installing Docker on Ubuntu 16.04. For a detailed introduction to the different components of a Docker container, check out The Docker Ecosystem: An Introduction to Common Components. Docker is an application that makes it simple and easy to run application processes in a container, which are like virtual machines, only more portable, more resource-friendly, and more dependent on the host operating system.