# 测试是否安装成功,输出以下内容可视为安装成功 $ docker run --rem hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 2db29710123e: Pull complete Digest: sha256:faa03e786c97f07ef34423fccceeec2398ec8a5759259f94d99078f264e9d7af 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/get-started/
移除旧 vaultwarden
当有旧的 vaultwarden 服务时,首先将其移除,接着进行后续步骤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
$ sudo su root # 查看当前活动中的所有 docker 容器 $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES xxxxx xxx xxx xxx xxx xxx xxx xxxxx xxx xxx xxx xxx xxx vaultwarden
# 检查 nginx 服务状态, 看到 Active: active(running) 说明正常运行 $ systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-04-20 16:08:19 UTC; 3 days ago Docs: man:nginx(8) Main PID: 2369 (nginx) Tasks: 2 (limit: 1153) Memory: 3.5M CGroup: /system.slice/nginx.service ├─2369 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; └─2380 nginx: worker process
# 如果遇到防火墙问题, 一般来说轻量云不设置的话不会有这个问题 $ sudo ufw app list $ sudo ufw allow 'Nginx HTTP' $ sudo ufw status Status: active