Docker初探

Docker是什麼?

在Docker的設定下,讓系統能在一個相同的環境下運行

  • 以指令自動化配置,省卻在新機器上花費手動設置的時間
  • 配合設定檔Dockerfile或者docker-compose.yml
  • 設定檔很小,大部分情況只有數十KB
  • 跟虛擬機器相比,運行速度快,佔用空間少

Docker有什麼?

  1. 映像檔(Image)
  • 預設套件的安裝包
  • 如數據庫,後后作業系統,伺服器
  • 官方提供各種預設映像檔供使用
  • 用家亦可以創建自己的映像檔
  • 根據映像檔而創造,配合用家設置檔的實際執行空間
  • 儲存空間

Docker如何使用?

原理

常用指令

$ docker ps # docker process
$ docker-compose build # build containers
$ docker-compose up # run the server

--

--

Let's go invent tomorrow instead of worrying about what happened yesterday.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam00

Let's go invent tomorrow instead of worrying about what happened yesterday.