Skip to main content

CÀI ĐẶT DOCKER TRÊN UBUNTU 22

 

CÀI ĐẶT DOCKER TRÊN UBUNTU 22


Gói cài đặt Docker hiện có sẵn trên Repo chính thức của Ubuntu, tuy nhiên đây có thể không phải là phiên bản mới nhất. Để chắc chắn thiết bị của bạn có thể cài đặt phiên bản mới nhất, chúng ta sẽ thực hiện cài đặt từ Docker Repository. Để làm được điều này, chúng ta cần thêm mới package source, GPG Key của Docker để chắc chắn rằng có thể tải về gói cài đặt rồi sau đó mới cài đặt Docker. Các bước thực hiện như sau:

  • Cập nhật package source của hệ thống:
sudo apt update
  • Cài đặt một số gói cần thiết nhằm giúp apt có thể sử dụng package qua HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
  • Thêm mới GPG Key của Docker:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • Thêm mới Docker Repository vào APT:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

Bước này sẽ cũng thêm mới các Repo vào package database của hệ thống.

  • Kiểm tra xem việc thay thế repo mới nhất với repo mặc định của hệ thông xem đã được thay thế chưa
apt-cache policy docker-ce

Kết quả trả về sẽ như sau, phiên bản Docker có thể thay đổi tùy vào thời điểm cài đặt:

docker-ce:
  Installed: (none)
  Candidate: 5:19.03.9~3-0~ubuntu-focal
  Version table:
     5:19.03.9~3-0~ubuntu-focal 500
        500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages

Trong output trên, lưu ý rằng docker-ce chưa được cài đặt, nhưng đã có sẵn phiên bản 5:19.03.9~3-0~ubuntu-focal trong repo sẵn sàng để cài đặt.

  • Cài đặt Docker:
sudo apt install docker-ce

Sau bước này, Docker sẽ được cài đặt, deamon sẽ được khởi động (Docker Service chạy ngầm) và process sẽ được thêm vào boot (khởi động cùng hệ thống). Để kiểm tra xem Docker Deamon đã được khởi động hay chưa, chúng ta sử dụng lệnh sau:

sudo systemctl status docker

Service khi hoạt động bình thường sẽ trả về kết quả như sau:

Output
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-05-19 17:00:41 UTC; 17s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 24321 (dockerd)
      Tasks: 8
     Memory: 46.4M
     CGroup: /system.slice/docker.service
             └─24321 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containe

Comments

Popular posts from this blog

[RAID] SWITCH FROM AHCI TO RAID WITH INTEL C600 CONTROLLER

I personally have used other ways to do this. Manipulating some registry settings in combination with a safe boot before booting normally does the trick as well. This works with both SATA SSD and M.2 NVMe drives and it enables relatively fast switching between back and forth between AHCI and RAID. I have described this method below.  I have also tried the same process used to switch from RAD to AHCI and that works as well. Switch to safe boot Reboot into BIOS Change from AHCI to RAID in the BIOS Boot into safe mode Turn off safe mode and reboot normally again Nothing else and that also did the trick, just like with moving from RAID to AHCI.  So the link above and my step by step below is here for completeness. You have options in case one of them doesn’t work! Step by step AHCI to RAID registry method This procedure I describe below works on Windows 10 1803/1809 and has been tested on Dell Latitude E6220 an XPS 13 9360. Editing the registry is...

TẠO DKIM RECORD CHO EXCHANGE SERVER

  Source: https://www.linkedin.com/pulse/how-configure-dkim-exchange-2019-simple-way-seyed-abdollahi Installation In Exchange Online DKIM is a built-in service, but on an on-prem Exchange 2019 deployment we need a 3rd party application to add this functionality to our Exchange infrastructure. In this guide we use Stefan Profanter's excellent dkim-exchange application for this purpose, which is available here:  https://github.com/Pro/dkim-exchange/releases/latest After installing the program, we open  Configuration.DkimSigner.exe and click on the "Install" button, or download the installer straight from https://codeload.github.com/Pro/dkim-exchange/legacy.zip/v*** Configuration After installation finished, open the configurator. C:\Program Files\Exchange DkimSigner\Configuration.DkimSigner.exe Click on the "Configure" button and move the DkimSigner agent to the very bottom of the list. Under the DKIM settings tab select relaxed canonicalization as Exchange t...

GIA HẠN SSL CHO EXCHANGE SERVER 2019

LINK: https://www.alitajran.com/create-certificate-exchange-server/#h-step-2-generate-exchange-certificate-request  ==Create request SSL New-ExchangeCertificate -Server "EXIDC1" -GenerateRequest -FriendlyName "EXCERT2025" -PrivateKeyExportable $true -SubjectName "c=VN, s=HCM, l=HCM, o=TTT, ou=IT, cn=mail.ttt.vn" -DomainName mail.ttt.vn,autodiscover.ttt.vn,autodiscover.saigonxanh.com,autodiscover.mpu.edu.vn ==Complete SSL Import-ExchangeCertificate -FileData ([System.IO.File]::ReadAllBytes('\\exidc1\Cert$\2378696128.crt')) -PrivateKeyExportable:$true -Password (ConvertTo-SecureString -String 'tttcompany' -AsPlainText -Force)