-
Notifications
You must be signed in to change notification settings - Fork 73
Docker
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.
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
- Docker Hub Account - {dockerhub_username}
- Docker installed on your ubuntu machine
- 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.
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
-
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
-
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}
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
Copyright (c) 2015 - 2023 Advanced Micro Devices, Inc. All rights reserved.