当前位置: 首页 > news >正文

seo网站推广企业番禺做网站设计

seo网站推广企业,番禺做网站设计,软件定制和开发,王也高清壁纸第三季文章目录 一、流转图二、基本操作2.1 查看本地容器进程2.2 启动容器2.2.1 交互式启动容器2.2.2 后台启动容器 2.3 进入容器2.4 停止启动重启容器2.5 退出容器2.6 删除容器2.7 提交容器#xff08;打包成镜像#xff09;2.8 拷贝文件2.8.1 拷贝容器内文件到宿主机2.8.2 拷贝宿… 文章目录 一、流转图二、基本操作2.1 查看本地容器进程2.2 启动容器2.2.1 交互式启动容器2.2.2 后台启动容器 2.3 进入容器2.4 停止启动重启容器2.5 退出容器2.6 删除容器2.7 提交容器打包成镜像2.8 拷贝文件2.8.1 拷贝容器内文件到宿主机2.8.2 拷贝宿主机文件到容器内 2.9 容器日志2.10 容器进程信息2.11 容器元数据2.12 查看容器状态2.13 其他 三、高级操作3.1 映射端口3.2 挂载数据卷3.2.1 自定义数据卷目录3.2.2 自动数据卷目录 3.3 传递环境变量3.4 容器内安装软件 一、流转图 二、基本操作 2.1 查看本地容器进程 #docker-ps # -a 所有包括运行的和已退出的 [rootserver ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 02b2d2343a23 hello-world /hello 8 days ago Exited (0) 8 days ago festive_meninsky[rootserver ~]# docker ps -n 2 # 显示正在运行的容器中最新的2个 [rootserver ~]# docker ps # 显示当前正在运行的容器 [rootserver ~]# docker ps -q # 显示正在运行的容器ID2.2 启动容器 #docker-run 2.2.1 交互式启动容器 -i表示交互-t表示后跟指定伪终端 [rootserver ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE alpine latest f8c20f8bbcb6 5 weeks ago 7.38MB hello-world latest d2c94e258dcb 8 months ago 13.3kB[rootserver ~]# docker run -it alpine /bin/sh / # ls bin etc lib mnt proc run srv tmp var dev home media opt root sbin sys usr / # 此时可看到有容器进程 [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 908b5182365c alpine /bin/sh 7 seconds ago Up 5 seconds interesting_bhabha [rootserver ~]# 若退出容器则容器进程也会结束因为容器内没有进程在运行着且没有指定后台运行容器。 2.2.2 后台启动容器 -d表示后台运行 [rootserver ~]# docker run -td --name myalpine alpine:latest 9ce9f829f6e66b354a2b806e07d2148754fe7bb710f2e1993d46b2661833a39f [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9ce9f829f6e6 alpine /bin/sh 25 seconds ago Up 24 seconds myalpine [rootserver ~]# 2.3 进入容器 #docker-exec 进入容器时开启一个新的终端 [rootserver ~]# docker exec -it 9ce9f829f6e6 /bin/sh / # exit [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9ce9f829f6e6 alpine /bin/sh 5 minutes ago Up About a minute myalpine#docker-attach 进入当前正在运行的容器终端 [rootserver ~]# docker attach 9ce9f829f6e62.4 停止启动重启容器 #docker-stop #docker-start #docker-restart [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9ce9f829f6e6 alpine /bin/sh 2 minutes ago Up 2 minutes myalpine [rootserver ~]# docker stop 9ce9f829f6e6 9ce9f829f6e6 [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [rootserver ~]# docker start 9ce9f829f6e6 9ce9f829f6e6 [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9ce9f829f6e6 alpine /bin/sh 3 minutes ago Up 1 second myalpine [rootserver ~]# docker restart 9ce9f829f6e6 9ce9f829f6e6 [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9ce9f829f6e6 alpine /bin/sh 3 minutes ago Up 1 second myalpine [rootserver ~]# 2.5 退出容器 exit # 容器停止并退出容器内没有进程在运行 Ctrl P Q # 容器不停止退出2.6 删除容器 #docker-rm [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9ce9f829f6e6 alpine /bin/sh 17 minutes ago Up 13 minutes myalpine[rootserver ~]# docker rm myalpine Error response from daemon: You cannot remove a running container 9ce9f829f6e66b354a2b806e07d2148754fe7bb710f2e1993d46b2661833a39f. Stop the container before attempting removal or force remove [rootserver ~]# docker stop myalpine myalpine [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [rootserver ~]# docker rm myalpine myalpine[rootserver ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 908b5182365c alpine /bin/sh 22 minutes ago Exited (0) 20 minutes ago interesting_bhabha 02b2d2343a23 hello-world /hello 8 days ago Exited (0) 8 days ago festive_meninsky [rootserver ~]# 若容器正在运行中仍要被删除则需使用docker rm -f强制删除 删除已停止运行的容器中的第一个容器 [rootserver ~]# for i in docker ps -a | grep -i exit | sed 1d | awk {print $1};do docker rm -f $i;done 02b2d2343a23 [rootserver ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 908b5182365c alpine /bin/sh 24 minutes ago Exited (0) 23 minutes ago interesting_bhabha [rootserver ~]# 2.7 提交容器打包成镜像 #docker-commit [rootserver ~]# docker start 908b5182365c 908b5182365c [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 908b5182365c alpine /bin/sh 36 minutes ago Up 5 minutes interesting_bhabha# 添加作者、描述指定容器ID加上镜像名:Tag [rootserver ~]# docker commit -aauther -mthis is a comment 908b5182365c myalpine:1.0.0 sha256:9cc4b0832b11004cbca8b55dbdde69647d0851d002b3e629d9bad149a8ce5424[rootserver ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE myalpine 1.0.0 9cc4b0832b11 4 seconds ago 7.38MB alpine latest f8c20f8bbcb6 5 weeks ago 7.38MB hello-world latest d2c94e258dcb 8 months ago 13.3kB2.8 拷贝文件 #docker-cp 2.8.1 拷贝容器内文件到宿主机 docker cp 容器id:容器内路径 宿主机目的路径docker cp 55321bcae33d:/test.java / # 拷贝到宿主机 / 根目录下2.8.2 拷贝宿主机文件到容器内 docker cp 文件or目录名 容器ID:/路径2.9 容器日志 #docker-logs [rootserver ~]# docker run hello-world 21 /dev/null [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [rootserver ~]# docker ps -a | grep hello de258d79d2af hello-world /hello 18 seconds ago Exited (0) 17 seconds ago elastic_mendel [rootserver ~]# docker logs -f de258d79d2afHello 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 theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare 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/[rootserver ~]# docker logs --helpUsage: docker logs [OPTIONS] CONTAINERFetch the logs of a containerAliases:docker container logs, docker logsOptions:--details Show extra details provided to logs-f, --follow Follow log output--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42mfor 42 minutes)-n, --tail string Number of lines to show from the end of the logs (default all)-t, --timestamps Show timestamps--until string Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42mfor 42 minutes)查看倒数5行日志并打上时间戳-t [rootserver ~]# docker logs --tail 5 de258d79d2afhttps://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/[rootserver ~]# docker logs --tail 5 -t de258d79d2af 2024-01-20T09:17:28.063983170Z https://hub.docker.com/ 2024-01-20T09:17:28.063985026Z 2024-01-20T09:17:28.063986546Z For more examples and ideas, visit: 2024-01-20T09:17:28.063988103Z https://docs.docker.com/get-started/ 2024-01-20T09:17:28.063989639Z -f跟踪日志 [rootserver ~]# docker run -d centos /bin/sh -c while true;do echo helloworld;sleep 1;done Unable to find image centos:latest locally latest: Pulling from library/centos a1d0c7532777: Pull complete Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177 Status: Downloaded newer image for centos:latest d9137e0fd7ea7799f65ba6f470723629610df41fc0735de60ff1f6ebeea2939c [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d9137e0fd7ea centos /bin/sh -c while t… 10 seconds ago Up 7 seconds determined_tharp [rootserver ~]# docker logs -tf -n5 d9137e0fd7ea 2024-01-20T09:23:42.471835910Z helloworld 2024-01-20T09:23:43.476544231Z helloworld 2024-01-20T09:23:44.479378544Z helloworld 2024-01-20T09:23:45.488346985Z helloworld 2024-01-20T09:23:46.491736593Z helloworld 2024-01-20T09:23:47.497556758Z helloworld 2024-01-20T09:23:48.507944232Z helloworld 2024-01-20T09:23:49.515828873Z helloworld2.10 容器进程信息 #docker-top 查看容器中进程信息 [rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d9137e0fd7ea centos /bin/sh -c while t… About a minute ago Up About a minute determined_tharp [rootserver ~]# docker top d9137e0fd7ea UID PID PPID C STIME TTY TIME CMD root 29345 29325 0 17:23 ? 00:00:00 /bin/sh -c while true;do echo helloworld;sleep 1;done root 29590 29345 0 17:25 ? 00:00:00 /usr/bin/coreutils --coreutils-prog-shebangsleep /usr/bin/sleep 12.11 容器元数据 #docker-inspect [rootserver ~]# docker inspect d9137e0fd7ea [{Id: d9137e0fd7ea7799f65ba6f470723629610df41fc0735de60ff1f6ebeea2939c,Created: 2024-01-20T09:23:24.883298959Z,Path: /bin/sh,Args: [-c,while true;do echo helloworld;sleep 1;done],State: {Status: running,Running: true,Paused: false,Restarting: false,OOMKilled: false,Dead: false,Pid: 29345,ExitCode: 0,Error: ,StartedAt: 2024-01-20T09:23:26.389867521Z,FinishedAt: 0001-01-01T00:00:00Z},Image: sha256:5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6,ResolvConfPath: /var/lib/docker/containers/d9137e0fd7ea7799f65ba6f470723629610df41fc0735de60ff1f6ebeea2939c/resolv.conf,HostnamePath: /var/lib/docker/containers/d9137e0fd7ea7799f65ba6f470723629610df41fc0735de60ff1f6ebeea2939c/hostname,HostsPath: /var/lib/docker/containers/d9137e0fd7ea7799f65ba6f470723629610df41fc0735de60ff1f6ebeea2939c/hosts,LogPath: /var/lib/docker/containers/d9137e0fd7ea7799f65ba6f470723629610df41fc0735de60ff1f6ebeea2939c/d9137e0fd7ea7799f65ba6f470723629610df41fc0735de60ff1f6ebeea2939c-json.log,Name: /determined_tharp,...2.12 查看容器状态 #docker-stats [rootserver ~]# docker stats CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS d9137e0fd7ea determined_tharp 0.15% 3.941MiB / 846.4MiB 0.47% 656B / 0B 11.2MB / 0B 22.13 其他 Docker运行容器时可设置分配CPU权重、绑核等操作。 分配CPU权重 --cpu-shares taskset 把进程绑定到特定CPU核上 stress 压力测试 三、高级操作 拉取nginx镜像做好后续操作的环境准备工作 [rootserver ~]# docker pull nginx Using default tag: latest latest: Pulling from library/nginx 2f44b7a888fa: Pull complete 8b7dd3ed1dc3: Pull complete 35497dd96569: Pull complete 36664b6ce66b: Pull complete 2d455521f76c: Pull complete dc9c4fdb83d6: Pull complete 8056d2bcf3b6: Pull complete Digest: sha256:4c0fdaa8b6341bfdeca5f18f7837462c80cff90527ee35ef185571e1c327beac Status: Downloaded newer image for nginx:latest docker.io/library/nginx:latest3.1 映射端口 -p映射端口容器外端口 - 容器内端口 --rm会在容器退出时自动清除挂载的卷以便清除数据 [rootserver ~]# docker run --rm --name mynginx -d -p81:80 nginx[rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 97665eae03a1 nginx /docker-entrypoint.… 9 minutes ago Up 9 minutes 0.0.0.0:81-80/tcp, :::81-80/tcp mynginx [rootserver ~]# 访问Nginx [rootserver ~]# curl 127.0.0.1 curl: (7) Failed connect to 127.0.0.1:80; Connection refused [rootserver ~]# curl 127.0.0.1:81 !DOCTYPE html html head titleWelcome to nginx!/title style html { color-scheme: light dark; } body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } /style /head body h1Welcome to nginx!/h1 pIf you see this page, the nginx web server is successfully installed and working. Further configuration is required./ppFor online documentation and support please refer to a hrefhttp://nginx.org/nginx.org/a.br/ Commercial support is available at a hrefhttp://nginx.com/nginx.com/a./ppemThank you for using nginx./em/p /body /html3.2 挂载数据卷 3.2.1 自定义数据卷目录 -v 容器外目录:容器内目录 此时容器外目录的内容会直接显示在容器内目录中 容器内目录中若存在文件则会被清空 [rootserver ~]# mkdir /html [rootserver ~]# touch /html/index.html[rootserver ~]# docker run -d --rm --name nginx_baidu -p 81:80 -v /html:/usr/share/nginx/html nginx 3c2492f1d1afee0f5d8d376c3e9991a5615138a78cd53875173d7f01fd3aeb0f[rootserver ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3c2492f1d1af nginx /docker-entrypoint.… 11 seconds ago Up 10 seconds 0.0.0.0:81-80/tcp, :::81-80/tcp nginx_baidu [rootserver ~]# [rootserver ~]# docker exec -it nginx_baidu /bin/sh # ls /usr/share/nginx/html index.html3.2.2 自动数据卷目录 [rootserver ~]# docker run -d --rm --name nginx_baidu -p 81:80 -v aaa:/usr/share/nginx/html nginx随意命名宿主机的目录名此时Docker会在找不到该路径后自动在/var/lib/docker/volumes/下创建数据卷同时将容器内映射目录中的内容全部复制到该自动创建的数据卷目录中多个容器可同时共享该数据卷。 3.3 传递环境变量 -e XXXyyy [rootserver ~]# docker run --rm -e OPSabcdef nginx printenv HOSTNAMEdfb69fa2b394 HOME/root PKG_RELEASE1~bookworm NGINX_VERSION1.25.3 PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NJS_VERSION0.8.2 OPSabcdef PWD/3.4 容器内安装软件 [rootserver ~]# docker exec -it 3c2492f1d1af /bin/bash root3c2492f1d1af:/# apt-get install wget Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package wget # 报错无法找到wget软件此时就需要更新updateroot3c2492f1d1af:/# apt-get update Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB] Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB] Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB] Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8787 kB] Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [12.7 kB] Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [134 kB] Fetched 9185 kB in 3s (2632 kB/s) Reading package lists... Doneroot3c2492f1d1af:/# apt-get install wget Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed:wget 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 984 kB of archives. After this operation, 3692 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian bookworm/main amd64 wget amd64 1.21.3-1b2 [984 kB] Fetched 984 kB in 2s (484 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package wget. (Reading database ... 7590 files and directories currently installed.) Preparing to unpack .../wget_1.21.3-1b2_amd64.deb ... Unpacking wget (1.21.3-1b2) ... Setting up wget (1.21.3-1b2) ...
http://www.w-s-a.com/news/721258/

相关文章:

  • 做百度手机网站推广普通话的宣传标语
  • 记事本可以做网站吗网站服务器是主机吗
  • 手机网站被拦截怎么办怎么解决东营建设信息网网
  • 外贸网站模板免费微信网站开发技术
  • 视频盗版网站怎么做福州网站seo
  • 成都金铭 网站建设做网站包含的技术
  • 长沙的网站建设公司哪家好做网站应选那个主题
  • 公司网站百度搜不到如何自己做一个网站
  • 学生如何建设网站网站开发程序
  • 网站建设公司哪家好 皆来磐石网络网站建设"淘宝网" 在颜色选取和搭配方面有哪些值得学习的地方.
  • 网站如何做移动规则适配北京住房与城乡建设部网站
  • 课堂阵地建设网站wordpress运行机制
  • 网站建设的需求方案企业网站建设费用明细
  • 创口贴网站模板京创影视app
  • 团购网站建设目的网站有很多304状态码
  • 运用阿里云怎么做网站外资企业可以在中国境内做网站吗
  • 云南住房和城乡建设局网站西安做官网的公司
  • 企业网站图片上传网站建设和应用的情况
  • 网站不显示内容吗聊城网架公司
  • 南昌网站建设企业网站托管外包怎么做
  • 做非洲外贸的网站网站可以用PS设计吗
  • PHP搭建IDC网站青岛福瀛建设集团网站
  • 安徽网站优化多少钱软件界面设计的基本原则
  • 网站建设动态页面修改删除dnf卖飞机的网站怎么做的
  • 万网是做什么的seo综合
  • 网站关键词分隔符php网站开发平台下载
  • 郑州那家做网站便宜商业计划书免费word版
  • 秦时明月的个人网站怎么做网站开发公司需要招聘哪些人
  • 广告网站建设制作设计服务商安卓app软件定制
  • 公司网站设计与实现中国职业培训在线官方网站