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:
- EBOX-58E (Intel Solution)
- Ubuntu 22.04 LTS
- Docker and Docker Composer installed
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.
REPOSITORY | TAG | IMAGE ID | CREATED | SIZE |
ubuntu | latest | 2b4cba85892a | 6 days ago | 72.8MB |
debian | latest | d40157244907 | 8 days ago | 124MB |
centos | latest | 5d0da3dc9764 | 5 months ago | 231MB |
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:
- How to install Ubuntu on EBOX-58E
- Install Docker on Ubuntu
- Run sudo command without a password on Linux
- EBOX Mini PC Ubuntu 12.04 non PAE Installation Guide
主要特點 EBOX-58E:
- Intel® Braswell x5-E8000 1.04GHz 四核心處理器
- 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 滑軌支架 (選配)
- PXE 網路開機
- AMI UEFI BIOS (可切換 Legacy 模式)
- TPM
- Auto Power On 自動開機
- 支援 100 x 100mm VESA
如需更多資訊和樣品需求,請寫信至 info@icop.com.tw,或致電離您最近的 ICOP Branch,或聯繫我們的 Worldwide Official Distributor.