Docker play

https://www.docker.com/ 詳實的資料

其實你需要的是這個 https://docs.docker.com/

我使用的安裝平臺爲ubuntu12.04.5 內核3.13(必須,文檔上要求)

https://docs.docker.com/installation/ubuntulinux/

一步一步按照上面做

  1. Log into your Ubuntu installation as a user with sudo privileges.

  2. 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
  3. 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.

  4. Verify docker is installed correctly.

    $ sudo docker run hello-world

    This command downloads a test image and runs it in a container.

裝好之後,我看到提示將自己普通用戶添加docker使用權限

sudo usermod -aG docker 你的用戶名

         然後你就可以開始享受docker的便捷與輕巧了

         一些簡單的命令就不說了,多練習一下能夠使用得差不多了,詳見https://docs.docker.com/userguide/

        裝完後,玩了一會docker過下癮,然後就跑去睡了,第二天起來開機,掛了

        出現kernel panic,提示大概意思是找不到root分區之類的信息,傻了,常用了alt+srq+reisub都沒用了,估計kernel都沒啓動

        怎麼都想不通啊,獲取翻文檔。

        好傢伙,忘記掛cgroup了。好吧,改!

        先用recovery mode進root 掛分區得到寫權限

       

  1. Edit the /etc/default/grub file.

  2. Set the GRUB_CMDLINE_LINUX value as follows:

    GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
  3. Save and close the file.

  4. Update GRUB.

    $ sudo update-grub
  5. Reboot your system.

 做完後,謝天謝地,重啓成功,然後喜滋滋繼續用僞蘋果了



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章