IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

三、Ubuntu 安装 Docker

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

文章永久连接:https://tech.souyunku.com/?p=5053

Docker 最初的版本就是运行在 Ubuntu 上,所以,Ubuntu 上安装 Docker 应该是最简单的了

系统要求

Docker CE 对 Ubuntu 的系统还是有一定的要求的

1、 首先必须是 64 位版本的,这个应该问题不大,只要不是老古董,早就是 64 位的了
2、 Ubuntu 的版本必须是下表,或者比下表更新的版本

    Artful 17.10 (Docker CE 17.11 Edge and higher only)
    Xenial 16.04 (LTS)
    Trusty 14.04 (LTS)

3、 Docker 要求 Ubuntu 系统的内核版本高于 3.10

我们可以使用 `uname -r` 命令来查看当前的内核版本
    [root@localhost ~] uname -r 
    4.2.0-16-generic

安装 Docker

Ubuntu 安装 Docker 的方式有很多中,我们选择最省事的那种,最快速的那种

目前最快速的安装 Docker 的方式是使用官方给出的脚本 https://get.docker.com/

只需要在终端里输入以下命令即可开始安装

[root@localhost ~]# curl -fsSL get.docker.com -o get-docker.sh
[root@localhost ~]# sudo sh get-docker.sh
...
...

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group grants the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

如果你使用的是 root 用户,可以先轻松下再回来,如果你使用的是普通用户,那么需要 sudo sh get-docker.sh,然后输入登录密码

稍等片刻,Docker 就会安装完毕,是不是很省事,因为我们连一张图都没发

可以安装完成后最后那几段提示

If you would like to use Docker as a non-root user, you should now consider
    adding your user to the "docker" group with something like:

    sudo usermod -aG docker your-user

   Remember that you will have to log out and back in for this to take effect!

意思是说,如果以非 root 用户可以运行 docker 时,需要执行 sudo usermod -aG docker souyunku 命令然后重新登陆,否则会有如下报错

[penglei@localhost ~]docker fun hello-world
docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host ?
...

启动 docker 服务

可以使用 services docker start 命令启动 Docker

[root@localhost ~]# service docker start

Docker Hello World

可以使用 docker run hello-world 命令运行 Hello World 查看是否安装成功

[root@localhost ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete 
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1、 The Docker client contacted the Docker daemon.
 2、 The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3、 The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4、 The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

干货推荐

本站推荐:精选优质专栏

附录:Docker 教程:系列文章

赞(87) 打赏



未经允许不得转载:搜云库技术团队 » 三、Ubuntu 安装 Docker

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码
IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

评论 抢沙发

大前端WP主题 更专业 更方便

联系我们联系我们

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

微信扫一扫打赏


Fatal error: Uncaught Exception: Cache directory not writable. Comet Cache needs this directory please: `/data/wangzhan/tech.souyunku.com.wp/wp-content/cache/comet-cache/cache/https/tech-souyunku-com/index.q`. Set permissions to `755` or higher; `777` might be needed in some cases. in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php:367 Stack trace: #0 [internal function]: WebSharks\CometCache\Classes\AdvancedCache->outputBufferCallbackHandler() #1 /data/wangzhan/tech.souyunku.com.wp/wp-includes/functions.php(5109): ob_end_flush() #2 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(303): wp_ob_end_flush_all() #3 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /data/wangzhan/tech.souyunku.com.wp/wp-includes/plugin.php(470): WP_Hook->do_action() #5 /data/wangzhan/tech.souyunku.com.wp/wp-includes/load.php(1097): do_action() #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php on line 367