Google Cloud Quick Reference
  • Quick Reference for GCP Cloud Shell
  • Running Docker on Ubuntu 16.4
  • Google Kubernetes Engine - Quick Reference
Powered by GitBook
On this page

Running Docker on Ubuntu 16.4

Docker Quick start on Ubuntu 16.4 - Command Reference - these notes assume you have general Linux experience and assumes you know what docker is.

To follow along with this tutorial you need an existing virtual machine running Ubuntu. Any cloud provider is fine.

Update the existing packages

sudo apt update

Install packages required to use apt over HTTPS

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add the Docker repository to APT sources:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

Install docker from the docker repo

apt-cache policy docker-ce

sudo apt install docker-ce

Now that docker is installed let's see the status

sudo systemctl status docker

Output

docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: en
   Active: active (running) since Mon 2018-08-06 13:23:17 UTC; 10h ago
     Docs: https://docs.docker.com
 Main PID: 3827 (dockerd)
    Tasks: 20
   Memory: 141.3M
      CPU: 1min 26.849s
   CGroup: /system.slice/docker.service
           ├─3827 /usr/bin/dockerd -H fd://
           └─3852 docker-containerd --config /var/run/docker/containerd/container

use this command to add users to docker if you prefer not to use sudo for every command

sudo usermod -aG docker ${USER}
docker ps -a #listg all containers active and inactive 

PreviousQuick Reference for GCP Cloud ShellNextGoogle Kubernetes Engine - Quick Reference

Last updated 6 years ago