Ubuntu 24.04

Ubuntu 24.04 Docker CE Install (Latest)

September 22, 2025 10 months ago

What Is curl -fsSL https://get.docker.com | sh?

The command:

curl -fsSL https://get.docker.com | sh

is widely known as a “curl-to-shell installer”. It’s a pattern where software providers host a shell script on the internet, and users download and immediately execute it in one line. In Docker’s case, this one-liner is an official shortcut for installing the Docker Engine on Linux systems.

But behind this simple command is a whole ecosystem of intentions, design choices, and cultural history in the UNIX/Linux world. Below is a deeper look at what it is conceptually, technically, and practically.

It Is a Convenience Installer

Docker created this script to reduce installation friction. Instead of requiring users to:

  • Add Docker’s GPG key
  • Add Docker’s apt or yum repository
  • Update package lists
  • Install several packages manually

…Docker bundles those steps into a single script that knows how to install Docker on many different Linux distributions (Ubuntu, Debian, Fedora, CentOS, etc.).

In other words, it’s an automation wrapper around the steps required to set up Docker correctly.

It Is a Remote Shell Script Executed Locally

This command downloads a script directly from a URL and pipes it into a shell:

  • curl downloads the script
  • sh executes it

This means your computer is running instructions that come from a remote server, on-the-fly, without saving the script to disk (unless you choose to).

This kind of command saves time but also demands trust.

It Is Part of an Old UNIX Culture

“Curl-to-sh” installers go back decades. Before package managers were standardized, developers often distributed installers as:

curl example.com/install.sh | sh

It remains popular today because:

  • It’s fast
  • It works the same on many platforms
  • It reduces friction for onboarding

Tools like Rust (rustup.rs), NVM, Homebrew on Linux, and others use similar patterns.

It Is an Official Docker-Supported Installation Path

Despite being simple, this script is maintained by Docker and supported by the Docker documentation. It’s not a random community hack — it’s an official tool.

Docker’s script:

  • Detects your Linux distribution
  • Ensures compatibility
  • Installs the latest stable Docker Engine
  • Configures the Docker daemon
  • Sets up the correct repositories for future updates

So, it’s essentially a smart bootstrap installer.

It Is a Tool for Automation and Cloud Provisioning

This command is extremely popular in:

  • Cloud-init scripts
  • Provisioning tools (Terraform, Ansible, Chef, Puppet)
  • CI/CD pipelines
  • Virtual machine setup scripts

Why? Because it removes human interaction. One line installs Docker with no prompts.

So you’ll see it often in scripts like:

#!/bin/bash
curl -fsSL https://get.docker.com | sh
usermod -aG docker ubuntu

It’s designed to be reproducible and non-interactive.

It Is a Trust-Based Mechanism

Running any remote script requires trust. Even though Docker maintains the script, the mechanism itself involves risk because:

  • You’re executing code you haven’t reviewed.
  • Any compromise of the server/DNS/CDN could inject malicious code.
  • It runs with the privileges of the current user (often root).

This does not mean the script is unsafe — only that users should understand the trust model behind such commands.

It Is a “Bootstrapper,” Not a Package Manager

The script’s main purpose is to:

  • Set up Docker’s repository correctly
  • Install Docker via your package manager
  • Configure the service

After installation, future updates come from your system’s normal package management tools (like apt or yum). The script itself does not remain on your system or manage Docker updates.

So it is a setup initializer, not an ongoing management utility.

It Is a Cross-Distro Abstraction Layer

Installing Docker on Linux differs by distribution:

  • Ubuntu uses apt
  • Fedora uses dnf
  • CentOS uses yum
  • Others use apk, zypper, etc.

The script abstracts all that complexity away. It auto-detects your environment and chooses the correct installation method.

That’s why many users prefer it over manual instructions.

Summary: What It Is, in One Sentence

It is an official, trust-based, automation-friendly, cross-distribution bootstrap installer that downloads and runs a remote script to set up Docker Engine quickly and consistently.


↑↓ navigate select
⌘K to toggle