File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright (C) 2025 Intel Corporation
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # Update the package index
7
+ sudo apt-get -y update
8
+
9
+ # Install prerequisites
10
+ sudo apt-get -y install ca-certificates curl
11
+
12
+ # Create the directory for the Docker GPG key
13
+ sudo install -m 0755 -d /etc/apt/keyrings
14
+
15
+ # Add Docker's official GPG key
16
+ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
17
+
18
+ # Set permissions for the GPG key
19
+ sudo chmod a+r /etc/apt/keyrings/docker.asc
20
+
21
+ # Add Docker repository to the sources list
22
+ echo " deb [arch=$( dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
23
+ $( . /etc/os-release && echo " $VERSION_CODENAME " ) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
24
+
25
+ # Update the package index with Docker packages
26
+ sudo apt-get -y update
27
+
28
+ # Install Docker packages
29
+ sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
30
+
31
+ # add existing user
32
+ sudo usermod -aG docker $USER
33
+
34
+ # Optional: Verify that Docker is installed correctly
35
+ sudo docker --version
You can’t perform that action at this time.
0 commit comments