# Install Docker

This procedure will install Docker on a Linux machine. Docker is required to build and push Edge containers to the ABB Docker repository. Once the containers are pushed, they can be referenced in Edge modules and run on the Edge device.

# Prerequisites

  • Valid login to Ubuntu 18.04 LTS Server or Desktop installation
  • Putty, RDP, or equivalent method to log in

# Steps

  1. Log in to the machine.
  2. Create a file called install_docker.sh and edit it.
  3. Paste the following contents into the file:
#!/bin/bash
###########################################
# Install Docker and related tools
# change log:
# 2020-Mar-10: Initial version
###########################################
if [ "$EUID" -ne 0 ]
then
  echo "Please, run as root."
  exit 1
fi

if ! command -v jq > /dev/null
then
  echo "Installing jq..."
  apt-get install jq -y
  echo "Installed jq."
fi

if ! command -v uuidgen > /dev/null
then
  echo "Installing uuid-runtime..."
  apt-get install uuid-runtime -y
  echo "Installed uuid-runtime."
fi

if ! command -v docker > /dev/null
then
  echo "Installing Docker..."
  apt-get update
  apt-get install apt-transport-https ca-certificates curl software-properties-common -y
  curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  apt-get update
  apt-get install docker-ce -y
  echo "Installed Docker."
fi

usermod -aG docker "$SUDO_USER"
echo "user added to docker group, relogin/reboot to see the change"
  1. Save the file.

  2. Change the permission on the file to allow execution.

chmod 755 install_docker.sh
  1. Run the file.
sudo ./install_docker.sh
  1. When completed, reboot the machine.

This completes the setup for Docker.

Last updated: 7/7/2021, 8:54:52 AM
Feedback