Skip to content
Kiriti Gowda edited this page Jan 23, 2021 · 7 revisions

  • Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.
  • Containers are isolated from one another and bundle their own software, libraries, and configuration files; they can communicate with each other through well-defined channels.
  • All containers are run by a single operating system kernel and therefore use fewer resources than virtual machines.
  • The software that hosts the containers is called Docker Engine.

READ MORE

Docker Installation on Ubuntu 18.04 / 20.04

sudo apt-get install curl
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker

Creating a docker image - Ubuntu 18.04 Base

Prerequisites

Steps to create a docker image

Step 1: Starting from an Ubuntu Image

  • Pull offical ubuntu docker from docker hub.
sudo docker pull ubuntu:18.04
  • Ubuntu docker hub repo has many versions available, use the image and tag which is required.

Step 2: Run the docker image

sudo docker run -it {USER_OPTIONS} --group-add video --network host ubuntu:18.04
  • Running the docker image with different user options, lets docker access different resources.

  • Review the user options using the following commands

 man docker
  • --groups-add video - adds you to the video group, --network host - allows you to access host network

Step 3: Install software or make changes to your docker image

  • Now you can change the docker image from within to include the software or changes to the settings

  • Inside the docker, use it as a normal ubuntu machine terminal

Step 4: Save changes on the docker

  • Open another terminal on the host machine

  • Check which docker images are currently in use, the below commands lists all docker in use

sudo docker ps
  • Now select the docker your are working on by noting the container id

  • Commit your changes to your docker

sudo docker commit {container_id} {dockerhub_username}/{docker_name_you_want}:{tag}

Step 5: Push docker image to your docker hub

sudo docker push {dockerhub_username}/{docker_name_you_want}:{tag}
  • Now the docker image is available on docker hub.

  • Check in help can be found using the following command

docker push --help

MIVisionX Dockers

Use pre-built dockers from MIVisionX

Clone this wiki locally