Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/manuals/engine/install/ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Docker from the repository.
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL {{% param "download-url-base" %}}/gpg -o /etc/apt/keyrings/docker.asc
sudo -E curl -fsSL {{% param "download-url-base" %}}/gpg -o /etc/apt/keyrings/docker.asc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should change this so that curl isn't executed as root;

curl -fsSL "{{% param "download-url-base" %}}/gpg" | sudo tee /etc/apt/keyrings/docker.asc > /dev/null

or with an intermediate file, but that requires a cleanup after;

curl -fsSL "{{% param "download-url-base" %}}/gpg" -o docker.asc
sudo install -o root -g root -m 0644 docker.asc /etc/apt/keyrings/docker.asc
rm -f docker.asc

@dvdksn @vvoland any thoughts? If we change, we should also update the debian.md accordingly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we previously agreed that sudo curl was an acceptable tradeoff - see https://github.com/docker/docs/pull/19138/files#r1467055019

I think sudo -E curl still seems OK to me but no strong opinions. If not sudo curl then I'd go for sudo tee > /dev/null

Copy link
Contributor

@vvoland vvoland Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal I think, but if we want something shorter than tee we could use: sudo cat - >/etc/apt/keyrings/docker.asc

or sudo cat ->/etc/apt/keyrings/docker.asc if we want to be funny and use the cat goes to operator (which is a close relative to the "downto" operator in C)

sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
Expand Down