# 如何在QNAP NAS 在Container Station LXC容器中安裝Docker(X86) 本教學教您如何在QNAP NAS 在Container Station LXC容器中安裝Docker,以X86平台作為示範 ## 安裝方式 1. 請先在 **App Center** 安裝 **Container Station**,並先將環境設定完成 2. SSH進入NAS,在NAS Host主機上編輯`/usr/local/container-station/lxc/share/lxc/config/common.conf`,將 ``` lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed ``` 這行修改為: ``` lxc.mount.auto = proc:mixed sys:mixed ``` (此步驟只要更新 Container Station皆須執行) (注意:因停用cgroup,Container Station LXC部分會無法正常顯示CPU及Ram負載狀況) 3. 返回web介面,開啟 **Container Station**,切換至 **Create** 頁面,移動到最下方選擇 **Ubuntu 16.04** 點擊 **Install**  3. 點擊**Advanced Settings**,設定Network,**Network Mode**選擇**Bridge**取得外部IP :   4. 其他部分視需求設定,設定完畢後點擊 **Create**  4. 等待建立完成  5. 使用SSH 進入NAS 6. 輸入指令進入 **Ubuntu 16.04** Console(視您建立的LXC變更相應的名稱) : ```bash lxc-console --name=ubuntu-xenial ``` 7. 安裝 **Docker-ce 17.09.1** 版本,參照以下指令步驟(預設帳號密碼為ubuntu/ubuntu) : ```bash sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get install docker-ce=17.09.1~ce-0~ubuntu -y ``` ###### tags: `Tutorial`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up