https://www.docker.com/ 詳實的資料
其實你需要的是這個 https://docs.docker.com/
我使用的安裝平臺爲ubuntu12.04.5 內核3.13(必須,文檔上要求)
https://docs.docker.com/installation/ubuntulinux/
一步一步按照上面做
-
Log into your Ubuntu installation as a user with
sudo
privileges. -
Verify that you have
wget
installed.$ which wget
If
wget
isn't installed, install it after updating your manager:$ sudo apt-get update $ sudo apt-get install wget
-
Get the latest Docker package.
$ wget -qO- https://get.docker.com/ | sh
The system prompts you for your
sudo
password. Then, it downloads and installs Docker and its dependencies. -
Verify
docker
is installed correctly.$ sudo docker run hello-world
This command downloads a test image and runs it in a container.
sudo usermod -aG docker 你的用戶名
然後你就可以開始享受docker的便捷與輕巧了
一些簡單的命令就不說了,多練習一下能夠使用得差不多了,詳見https://docs.docker.com/userguide/
裝完後,玩了一會docker過下癮,然後就跑去睡了,第二天起來開機,掛了
出現kernel panic,提示大概意思是找不到root分區之類的信息,傻了,常用了alt+srq+reisub都沒用了,估計kernel都沒啓動
怎麼都想不通啊,獲取翻文檔。
好傢伙,忘記掛cgroup了。好吧,改!
先用recovery mode進root 掛分區得到寫權限
-
Edit the
/etc/default/grub
file. -
Set the
GRUB_CMDLINE_LINUX
value as follows:GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
-
Save and close the file.
-
Update GRUB.
$ sudo update-grub
-
Reboot your system.