Xun installs Docker for the 3588 development board Ubuntu

Mondo Technology Updated on 2024-02-01

When using the Xunwei RK3588 development board, we generally use a virtual machine to install ubuntu2004 to compile the Android source code or Linux source code, but the most troublesome thing about compiling the source code is the host environment. What if I have a lot of boards, each with a different compilation environment, and I already have one on my local computer?

Is there a unified, virtual software and hardware platform that customers can use directly to compile the source code?

The answer is yes, a platform like this is a container, and there are many kinds of containers, and docker is one of the better ones.

ubuntu install docker

Next, we install docker in ubuntu (any version) of the virtual machine.

1.2.1 Set up the docker repository.

1) To update the apt package index, enter the following command:

sudo apt-get update

2) Install the apt dependency package, which is used to get the repository over https, enter the following command:

sudo apt-get install \

apt-transport-https \

ca-certificates \

curl \

gnupg-agent \

software-properties-common

3) Add the official GPG key of docker and enter the following command:

curl -fssl | sudo apt-key add -

4) 9dc8 5822 9fc7 dd38 854a e2d8 8d81 803c 0ebf cd88 By searching for the last 8 characters of the fingerprint, verify that you now have the key with the fingerprint, enter the following command:

sudo apt-key fingerprint 0ebfcd88

5) Use the following command to set up a stable repository.

sudo add-apt-repository \

deb [arch=amd64] \

lsb_release -cs) \

stable"

1.2.2 Install docker engine-community

1) To update the apt package index, enter the following command:

sudo apt-get update

2) Install the latest version of docker engine-community and containerd, enter the following command:

sudo apt-get install docker-ce docker-ce-cli containerd.io

3) Test whether docker is installed successfully, enter the following command, and print out the following information to install successfully.

sudo docker run hello-world

1.2.3 Use the USTC mirror accelerator.

1) Add an image source

sudo vim /etc/docker/daemon.json

Enter the following:

registry-mirrors": [""]

2) Restart the docker service:

sudo systemctl restart docker

1.2.4 Configure docker to be accessible to normal users.

1) To add the docker user group, enter the following command:

sudo groupadd docker

2) Add the logged-in user to the docker user group

sudo usermod -ag docker $user

3) Update the user group (this step is very important):

newgrp docker

4) Restart the docker service

sudo systemctl enable docker

sudo systemctl restart docker

5) Run hello-world directly as a normal user and enter the following command:

docker run hello-world

Related Pages