RunningLinuxContainersonUbuntu_article

Running Linux Containers on Ubuntu

In the previous tutorial (Install Docker on Ubuntu 22.04 LTS (Intel Solution)), we have successfully installed Docker and Docker Compose, and ran our first application “Hello World”. In this tutorial, we will be installing multiple containers and running them all at once.

Prerequisites

To follow along in this tutorial, you will need the following:


Running Linux Containers on Ubuntu

Step 1 – Linux Containers

In this step, we are going to pull a few images from the Docker Hub Repository and they are Debian, CentOS, and Ubuntu.

Debian Container

$ sudo docker pull Debian

Using default tag: latest
latest: Pulling from library/debian
e4d61adff207: Pull complete
Digest: sha256:10b622c6cf6daa0a295be74c0e412ed20e10f91ae4c6f3ce6ff0c9c04f77cbf6
Satus: Downloaded newer image for debian:latest
docker.io/library8debian:latest

CentOS Container

$ sudo docker pull Debian

Using default tag: latest
latest: Pulling from library/centos
a1d0c7532777: Pull complete
Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Satus: Downloaded newer image for centos:latest
docker.io/library/centos:latest

Ubuntu Container

$ sudo docker pull ubuntu

Using default tag: latest
latest: Pulling from library/ubuntu
7c3b88808835: Pull complete
Digest: sha256:8ae9bafbb64f63a50caab98fd3a5e37b3eb837a3e0780b78e5218e63193961f9
Satus: Downloaded newer image for ubuntu:latest
docker.io/library/ubuntu:latest


We just successfully pulled 3 images, to verify, type the following command.

$ sudo docker pull ubuntu

We see the following result.

As you can see above, we just pulled down 3 different images from the Docker Hub repository. Now we can start using them.


Step 2 – Interactive Shell

By using an interactive shell, we can execute bash shell to install and remove packages. For example, let’s take CentOS and execute an interactive shell by using the following command.

$ sudo docker run -it centos bash

This will bring us to the root directory and type ls -la to list directory

[root@0894ec55d7b4 /]# ls -la

This command will list all files and directory in the root user. Please also note that all images that are prebuilt uses root by default. You may or could change to a non-root user but that may take some configurations and a pre-build image for that to work.

To exit CentOS, just type exit. You can however do the same command for Ubuntu and Debian as well.


Continue Reading:


EBOX-58N f

Main features of EBOX-58E:

  • Intel® Braswell x5-E8000 1.04GHz Quad Core
  • SO-DIMM, DDR3L‐1600MHz up to 8GB
  • 2S / 4U / 2GLAN / Mic-in / Line-out / HDMI / SATA / M.2 / mSD
  • Operation Temperature: 0°C ~ +60°C
  • RS-232 / RS-485 / TTL(Optional)
  • DIN Rail Support (Optional)
  • PXE diskless boot
  • AMI UEFI BIOS (Legacy mode switchable)
  • TPM
  • 自動電源オン
  • 100x100mm VESA standard

For more info and sample request, please write to info@icop.com.twお近くの ICOP支店にお電話いただくか、 Worldwide Official Distributor.

お買い物カゴ
上部へスクロール