Skip to main content

Εγκατάσταση Docker σε Ubuntu

Run

Χωρίς theπολλά followingπολλά commandξεκινάμε toτην uninstallεγκατάσταση

all

Αρχικά conflictingτρέχουμε packages:

την παρακάτω εντολή για να αφαιρέσουμε όλα τα πακέτα του Docker και να κάνουμε καθαρή εγκατάσταση.

 sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)

  1. Set

    1. upΡύθμιση Docker'sτου apt repository.repository
    #του AddDocker

    Docker's

    Προσθέτουμε officialτο επίσημο GPG key:key του Docker (GNU Privacy Guard Key)

    sudo apt update
    sudo apt install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    #
    και Addστην theσυνέχεια προσθέτουμε το repository toστις Aptπηγές sources:του apt
    sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
    Types: deb
    URIs: https://download.docker.com/linux/ubuntu
    Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
    Components: stable
    Signed-By: /etc/apt/keyrings/docker.asc
    EOF

    και τέλος ενημερώνουμε την λίστα πακέτων

    sudo apt update
    

  2. Install

    2. theΕγκατάσταση των πακέτων Docker

    packages.

    Εγκατάσταση
    LatestSpecificτης version
    πιο
    Toπρόσφατης installέκδοσης

    the

    Για latestνα version,εγκαταστήσετε run:

την τελευταία έκδοση, εκτελέστε:

 sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Note
The

Σημείωση:
Η υπηρεσία Docker serviceξεκινά startsαυτόματα automaticallyμετά afterτην installation.εγκατάσταση.

To
verify
that
Για να ελέγξετε ότι το Docker isτρέχει, running,εκτελέστε:
use:
 sudo systemctl status docker

Some

Αν systemsδεν mayτρέχει haveτότε this behavior disabled and will require a manual start:

εκτελέστε:

 sudo systemctl start docker


  • Verify

    3. thatΕπιβεβαίωση theεπιτυχούς installationεγκατάστασης

    is

    Εκτελέστε successfulτο byimage running the hello-world image:world:

     sudo docker run hello-world
    
    
    This

    Αυτή commandη downloadsεντολή aκατεβάζει testένα δοκιμαστικό image andκαι runsτο itεκτελεί inσε aένα container.
    Όταν When theτο container runs,τρέξει itσωστά, printsεμφανίζει aένα confirmationμήνυμα messageεπιβεβαίωσης andκαι exits.

  • You have now successfully installed and started Docker Engine.
    τερματίζεται.