Try   HackMD

การติดตั้ง Docker บน Debian

Docker เป็น platform ที่ช่วยให้การติดตั้งใช้งาน application ได้สะดวกและรวดเร็ว

สำหรับรายละเอียดเกี่ยวกับ Docker สามารถหาอ่านได้จากเวปไซต์ของ Docker เอง หรือบทความต่างๆ บนอินเตอร์เน็ต

สิ่งแรกที่ต้องทำในการติดตั้ง docker คือการ remove version เก่าที่อาจจะเคยติดตั้งไว้ก่อนหน้า

$ sudo apt remove docker docker-engine docker.io containerd runc

จากนั้นก็ทำการ update package list และติดตั้ง packages ที่จำเป็นต้องใช้

$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

ทำการเพิ่ม gpg key ของ docker และตรวจสอบ key fingerprint

$ curl -fsSL https://download.docker.com/linux/debian/gpg  | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <docker@docker.com>
sub   4096R/F273FCD8 2017-02-22

และเพิ่ม repository เข้าใน sourcelist

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

เมื่อเตรียมเป็นที่เรียบร้อย ก็สามารถดำเนินการติดตั้งได้

$ sudo apt update
$ sudo apt install docker-ce docker-ce-cli containerd.io

ติดตั้งเสร็จ สามารถทดสอบ

$ sudo docker ps -a
$ sudo docker image ls
$ sudo docker run hello-world
$ sudo docker ps
$ sudo docker ps -a
$ sudo docker image ls

อ้างอิง จาก https://docs.docker.com/install/linux/docker-ce/debian/

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

ความคิดเห็นคำแนะนำของท่านต่อบทความนี้ จะถูกนำมาใช้ในการพัฒนาปรับปรุงงานเขียนของผม อย่างไงก็รบกวนแสดงความเห็นคิดด้วยนะครับ
.
สนับสนุนการเงินได้ที่

  • บัญชีกสิกรไทย 003–3–29344–5