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

足球直播网站开发定制软文如何推广

足球直播网站开发定制,软文如何推广,服务器网站搭建教程,湖南今日头条新闻文章目录 1、Docker 环境信息命令1.1、docker info1.2、docker version 2、系统日志信息常用命令2.1、docker events2.2、docker logs2.3、docker history 3、容器的生命周期管理命令3.1、docker create3.2、docker run 总结 1、Docker 环境信息命令 1.1、docker info 显示 D…

文章目录

  • 1、Docker 环境信息命令
    • 1.1、docker info
    • 1.2、docker version
  • 2、系统日志信息常用命令
    • 2.1、docker events
    • 2.2、docker logs
    • 2.3、docker history
  • 3、容器的生命周期管理命令
    • 3.1、docker create
    • 3.2、docker run
  • 总结

1、Docker 环境信息命令

1.1、docker info

显示 Docker 系统信息,包括镜像、容器数、仓库镜像、架构等。

docker info [OPTIONS]

示例:

king@king-server:~$ docker info
Client: Docker Engine - CommunityVersion:    24.0.7Context:    defaultDebug Mode: falsePlugins:buildx: Docker Buildx (Docker Inc.)Version:  v0.11.2Path:     /usr/libexec/docker/cli-plugins/docker-buildxcompose: Docker Compose (Docker Inc.)Version:  v2.21.0Path:     /usr/libexec/docker/cli-plugins/docker-composeServer:Containers: 6Running: 1Paused: 0Stopped: 5Images: 3Server Version: 24.0.7Storage Driver: overlay2Backing Filesystem: extfsSupports d_type: trueUsing metacopy: falseNative Overlay Diff: trueuserxattr: falseLogging Driver: json-fileCgroup Driver: cgroupfsCgroup Version: 1Plugins:Volume: localNetwork: bridge host ipvlan macvlan null overlayLog: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslogSwarm: inactiveRuntimes: runc io.containerd.runc.v2Default Runtime: runcInit Binary: docker-initcontainerd version: 3dd1e886e55dd695541fdcd67420c2888645a495runc version: v1.1.10-0-g18a0cb0init version: de40ad0Security Options:apparmorseccompProfile: builtinKernel Version: 5.4.0-169-genericOperating System: Ubuntu 20.04.5 LTSOSType: linuxArchitecture: x86_64CPUs: 4Total Memory: 3.797GiBName: king-serverID: 2cf468ba-1204-4a1a-bebf-e859aaab7ca2Docker Root Dir: /var/lib/dockerDebug Mode: falseExperimental: falseInsecure Registries:127.0.0.0/8Live Restore Enabled: false

1.2、docker version

显示 Docker 版本信息。

docker version [OPTIONS]

示例:

king@king-server:~$ docker version
Client: Docker Engine - CommunityVersion:           24.0.7API version:       1.43Go version:        go1.20.10Git commit:        afdd53bBuilt:             Thu Oct 26 09:08:01 2023OS/Arch:           linux/amd64Context:           defaultServer: Docker Engine - CommunityEngine:Version:          24.0.7API version:      1.43 (minimum version 1.12)Go version:       go1.20.10Git commit:       311b9ffBuilt:            Thu Oct 26 09:08:01 2023OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.6.26GitCommit:        3dd1e886e55dd695541fdcd67420c2888645a495runc:Version:          1.1.10GitCommit:        v1.1.10-0-g18a0cb0docker-init:Version:          0.19.0GitCommit:        de40ad0

2、系统日志信息常用命令

2.1、docker events

从服务器获取实时事件(监听docker事件)。

docker events [OPTIONS]
OPTIONS说明:
-f :根据条件过滤事件;
--since :从指定的时间戳后显示所有事件;
--until :流水时间显示到指定的时间为止;

示例:

# 第一个终端执行
docker events
# 第二个终端操作容器,比如docker run -d nginx
docker start/stop/restart
# 查看第一个终端输出
# 启动容器事件
2022-12-08T14:18:01.476501682Z container create 36f6736b9c6289da6db95898507796a378cd03e29b51166039c5a5a593377fb0 (image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=stupefied_newton)
2022-12-08T14:18:01.578704583Z network connect fdb00a147400b60e2c0706129ed2b143a13c02c5675b5fc2871c5d4ed42aa478 (container=36f6736b9c6289da6db95898507796a378cd03e29b51166039c5a5a593377fb0, name=bridge, type=bridge)
2022-12-08T14:18:03.310080179Z container start 36f6736b9c6289da6db95898507796a378cd03e29b51166039c5a5a593377fb0 (image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=stupefied_newton)# stop事件
2022-12-08T14:20:19.252053300Z container kill 36f6736b9c6289da6db95898507796a378cd03e29b51166039c5a5a593377fb0 (image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=stupefied_newton, signal=3)
2022-12-08T14:20:19.365758840Z container die 36f6736b9c6289da6db95898507796a378cd03e29b51166039c5a5a593377fb0 (exitCode=0, image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=stupefied_newton)
2022-12-08T14:20:19.468679557Z network disconnect fdb00a147400b60e2c0706129ed2b143a13c02c5675b5fc2871c5d4ed42aa478 (container=36f6736b9c6289da6db95898507796a378cd03e29b51166039c5a5a593377fb0, name=bridge, type=bridge)
2022-12-08T14:20:19.535147938Z container stop 36f6736b9c6289da6db95898507796a378cd03e29b51166039c5a5a593377fb0 (image=nginx, maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>, name=stupefied_newton)

2.2、docker logs

docker logs,通常用于排查容器里面的问题。比如容器里部署的程序执行不起来,由于docker做了隔离,就需要使用docker logs来排除问题。

docker logs [OPTIONS] CONTAINER
OPTIONS说明:
-f : 跟踪日志输出
--since :显示某个开始时间的所有日志
-t : 显示时间戳
--tail :仅列出最新N条容器日志
-n :显示最后多少行的日志

示例:

king@king-server:~$ docker logs -f affectionate_pare
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/01/21 11:12:09 [notice] 1#1: using the "epoll" event method
2024/01/21 11:12:09 [notice] 1#1: nginx/1.25.3
2024/01/21 11:12:09 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14) 
2024/01/21 11:12:09 [notice] 1#1: OS: Linux 5.4.0-169-generic
2024/01/21 11:12:09 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/01/21 11:12:09 [notice] 1#1: start worker processes
2024/01/21 11:12:09 [notice] 1#1: start worker process 29
2024/01/21 11:12:09 [notice] 1#1: start worker process 30
2024/01/21 11:12:09 [notice] 1#1: start worker process 31
2024/01/21 11:12:09 [notice] 1#1: start worker process 32
king@king-server:~$ docker logs -n 10 affectionate_pare
2024/01/21 11:12:09 [notice] 1#1: using the "epoll" event method
2024/01/21 11:12:09 [notice] 1#1: nginx/1.25.3
2024/01/21 11:12:09 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14) 
2024/01/21 11:12:09 [notice] 1#1: OS: Linux 5.4.0-169-generic
2024/01/21 11:12:09 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/01/21 11:12:09 [notice] 1#1: start worker processes
2024/01/21 11:12:09 [notice] 1#1: start worker process 29
2024/01/21 11:12:09 [notice] 1#1: start worker process 30
2024/01/21 11:12:09 [notice] 1#1: start worker process 31
2024/01/21 11:12:09 [notice] 1#1: start worker process 32

2.3、docker history

查看指定镜像的创建历史。

docker history [OPTIONS] IMAGE
OPTIONS说明:
-H :以可读的格式打印镜像大小和日期,默认为true;
--no-trunc :显示完整的提交记录;
-q :仅列出提交记录ID

示例:

king@king-server:~$ docker history affectionate_pare
Error response from daemon: No such image: affectionate_pare:latest
king@king-server:~$ docker images
REPOSITORY    TAG       IMAGE ID       CREATED        SIZE
registry      2         909c3ff012b7   7 weeks ago    25.4MB
nginx         latest    d453dd892d93   2 months ago   187MB
hello-world   latest    d2c94e258dcb   8 months ago   13.3kB
king@king-server:~$ docker history nginx
IMAGE          CREATED        CREATED BY                                      SIZE      COMMENT
d453dd892d93   2 months ago   CMD ["nginx" "-g" "daemon off;"]                0B        buildkit.dockerfile.v0
<missing>      2 months ago   STOPSIGNAL SIGQUIT                              0B        buildkit.dockerfile.v0
<missing>      2 months ago   EXPOSE map[80/tcp:{}]                           0B        buildkit.dockerfile.v0
<missing>      2 months ago   ENTRYPOINT ["/docker-entrypoint.sh"]            0B        buildkit.dockerfile.v0
<missing>      2 months ago   COPY 30-tune-worker-processes.sh /docker-ent…   4.62kB    buildkit.dockerfile.v0
<missing>      2 months ago   COPY 20-envsubst-on-templates.sh /docker-ent…   3.02kB    buildkit.dockerfile.v0
<missing>      2 months ago   COPY 15-local-resolvers.envsh /docker-entryp…   298B      buildkit.dockerfile.v0
<missing>      2 months ago   COPY 10-listen-on-ipv6-by-default.sh /docker…   2.12kB    buildkit.dockerfile.v0
<missing>      2 months ago   COPY docker-entrypoint.sh / # buildkit          1.62kB    buildkit.dockerfile.v0
<missing>      2 months ago   RUN /bin/sh -c set -x     && groupadd --syst…   112MB     buildkit.dockerfile.v0
<missing>      2 months ago   ENV PKG_RELEASE=1~bookworm                      0B        buildkit.dockerfile.v0
<missing>      2 months ago   ENV NJS_VERSION=0.8.2                           0B        buildkit.dockerfile.v0
<missing>      2 months ago   ENV NGINX_VERSION=1.25.3                        0B        buildkit.dockerfile.v0
<missing>      2 months ago   LABEL maintainer=NGINX Docker Maintainers <d…   0B        buildkit.dockerfile.v0
<missing>      2 months ago   /bin/sh -c #(nop)  CMD ["bash"]                 0B        
<missing>      2 months ago   /bin/sh -c #(nop) ADD file:ac3cd70031d35e46d…   74.8MB

3、容器的生命周期管理命令

3.1、docker create

创建一个新的容器但不启动它,语法同docker run。
示例:

docker create nginx

3.2、docker run

创建一个新的容器并运行一个命令。

docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

常用选项:

  • –add-host:容器中hosts文件添加 host:ip 映射记录。
docker run --rm -it --add-host db-static:86.75.30.9 ubuntu cat /etc/hosts
  • -a, --attach:附加到 STDIN, STDOUT 或 STDERR。
docker run --rm -a stdin -a stdout -i -t ubuntu /bin/bash
  • –cidfile:将容器id写入到指定文件。
docker run --rm --cidfile /tmp/idfile ubuntu
  • -d, --detach:后台运行容器并打印容器id。
  • –detach-keys:指定将容器切回后台的按键,默认:CTRL-p+CTRL-q。
  • –disable-content-trust:跳过镜像验证,默认为TRUE。
  • –domainname:设置容器网络服务域名。
  • –entrypoint:覆盖镜像默认程序入口。
docker run --rm -it --entrypoint /bin/bash nginx
  • -e, --env:设置环境变量。
  • –env-file:从文件中读取环境变量。
  • –expose:暴露一个或多个端口。
  • –group-add:为容器用户添加更多用户组。
docker run --rm --group-add audio --group-add nogroup --group-add 777 ubuntu id
  • -h, --hostname string:设置主机名。
  • –init 在容器内运行init,转发信号并捕获进程。
# ps 对比容器的元祖进程 
docker run --rm -it ubuntu bash 
docker run --rm -it --init ubuntu bash
  • -i, --interactive:保持标准输入设备处于打开状态。
  • -l, --label list:设置容器元数据labels。
  • –label-file list:从文件中读取以换行作为分隔符的label。
  • –link:添加一个其他容器的链接,及修改当容器的/etc/hosts文件。
  • –log-driver:容器日志驱动,none、local、json-file、syslog、journald、gelf、fluentd、awslogs、splunk、etwlogs、gcplogs、logentries。
  • –log-opt:日志驱动选项。
  • –mount:将文件系统挂载到容器,与 -v 类似。
# 挂载volume 
docker run -t -i --rm --mount type=volume,target=/data ubuntu bash 
# 创建目录 
mkdir /tmp/data 
# 修改目录所有权,仅当使用userns的情况下需要 
sudo chown 165536:root /tmp/data 
# bind 磁盘已存在目录 
docker run -t -i --rm --mount type=bind,src=/tmp/data,dst=/data ubuntu bash
  • –name:指定容器名称。
  • –privileged:授予容器超级权限。
  • -p, --publish:发布容器端口都主机端口。
  • -P, --publish-all:将所有暴露的端口发布到主机随机端口。
  • –pull:运行前拉取图像,(always|missing|never),默认 missing。
  • –pids-limit:限制容器中pid个数。
  • –read-only :将容器跟文件系统装载为只读。
  • –restart:当容器退出时的重启策略,默认为no。
  • –rm:当容器退出时,自动删除容器。
  • –sig-proxy:将接收到的信号代理到进程(默认为true)。
  • –stop-signal:停止容器的信号(默认为“SIGTERM”)。
  • –stop-timeout:容器停止超时时长,单位s。
  • –tmpfs:装载tmpfs目录。
docker run -dit --rm --tmpfs /run1:rw,noexec,nosuid,size=65536k ubuntu bash
  • -t, --tty:分配一个伪终端设备。
  • -u, --user: 用户名或用户ID (格式: <name|uid>[:<group|gid>])。
  • -v, --volume :绑定数据卷。
  • –volume-driver:容器的可选卷驱动程序。
  • –volumes-from:从指定的容器装载数据卷。
  • -w, --workdir:容器内的工作目录。

总结

docker run主要做三件事情:创建容器、连接网络、启动容器。
在这里插入图片描述


文章转载自:
http://dinncotreadboard.wbqt.cn
http://dinncoartificialness.wbqt.cn
http://dinncoauspicate.wbqt.cn
http://dinncospeltz.wbqt.cn
http://dinncoaustral.wbqt.cn
http://dinncopenates.wbqt.cn
http://dinncoviii.wbqt.cn
http://dinncozoophilism.wbqt.cn
http://dinncoapa.wbqt.cn
http://dinncobirthstone.wbqt.cn
http://dinncoloon.wbqt.cn
http://dinncopetcock.wbqt.cn
http://dinncononcommitted.wbqt.cn
http://dinncoisapi.wbqt.cn
http://dinncoauriculate.wbqt.cn
http://dinncovoracious.wbqt.cn
http://dinncovise.wbqt.cn
http://dinncodisaffiliate.wbqt.cn
http://dinncooratorian.wbqt.cn
http://dinncooutyell.wbqt.cn
http://dinncoshiny.wbqt.cn
http://dinncobestrew.wbqt.cn
http://dinncodishwatery.wbqt.cn
http://dinncoarsenal.wbqt.cn
http://dinncomicrokit.wbqt.cn
http://dinncoschistosomiasis.wbqt.cn
http://dinncolichenin.wbqt.cn
http://dinncoexceedingly.wbqt.cn
http://dinncoacoustical.wbqt.cn
http://dinncocrossbuttock.wbqt.cn
http://dinncoinbox.wbqt.cn
http://dinncodelitescent.wbqt.cn
http://dinncoprocession.wbqt.cn
http://dinncomym.wbqt.cn
http://dinncocargoboat.wbqt.cn
http://dinncounentertaining.wbqt.cn
http://dinncotouching.wbqt.cn
http://dinncocrucifixion.wbqt.cn
http://dinncofelon.wbqt.cn
http://dinncoforaminate.wbqt.cn
http://dinncotreponeme.wbqt.cn
http://dinncostructural.wbqt.cn
http://dinncovitta.wbqt.cn
http://dinncopalmitic.wbqt.cn
http://dinncogeophysics.wbqt.cn
http://dinncoanthropotomy.wbqt.cn
http://dinncocentrist.wbqt.cn
http://dinncoenthetic.wbqt.cn
http://dinncogogo.wbqt.cn
http://dinncobane.wbqt.cn
http://dinncoirritate.wbqt.cn
http://dinncodemirep.wbqt.cn
http://dinnconeckwear.wbqt.cn
http://dinncopilosity.wbqt.cn
http://dinncoanimateur.wbqt.cn
http://dinncocollege.wbqt.cn
http://dinncocaloyer.wbqt.cn
http://dinncocopyread.wbqt.cn
http://dinncomultiprograming.wbqt.cn
http://dinncogalgenhumor.wbqt.cn
http://dinncoswingometer.wbqt.cn
http://dinncoundeclared.wbqt.cn
http://dinncotransmutation.wbqt.cn
http://dinncometeorologist.wbqt.cn
http://dinncobandore.wbqt.cn
http://dinncomeningococcus.wbqt.cn
http://dinncoshow.wbqt.cn
http://dinncobejeaned.wbqt.cn
http://dinncotalma.wbqt.cn
http://dinncovaletudinary.wbqt.cn
http://dinncoreactionism.wbqt.cn
http://dinncopolyacrylamide.wbqt.cn
http://dinncomultidimensional.wbqt.cn
http://dinncoalternating.wbqt.cn
http://dinncofloodway.wbqt.cn
http://dinncoserow.wbqt.cn
http://dinncohospodar.wbqt.cn
http://dinncotemporization.wbqt.cn
http://dinncosphacelous.wbqt.cn
http://dinncoprognathous.wbqt.cn
http://dinncomaidstone.wbqt.cn
http://dinncoaustronesian.wbqt.cn
http://dinncospoutless.wbqt.cn
http://dinncofeebleness.wbqt.cn
http://dinncomohist.wbqt.cn
http://dinncoironical.wbqt.cn
http://dinncorecrimination.wbqt.cn
http://dinncomorsel.wbqt.cn
http://dinncoconcordia.wbqt.cn
http://dinncoshortage.wbqt.cn
http://dinncoreword.wbqt.cn
http://dinncoantechamber.wbqt.cn
http://dinncoanaphrodisiac.wbqt.cn
http://dinncocarloadings.wbqt.cn
http://dinncopumper.wbqt.cn
http://dinncofactoried.wbqt.cn
http://dinncomatrimonial.wbqt.cn
http://dinncofundraising.wbqt.cn
http://dinncohypoderma.wbqt.cn
http://dinncoceaselessly.wbqt.cn
http://www.dinnco.com/news/100591.html

相关文章:

  • 米东区做网站今日新闻国际头条新闻
  • 希音电商网站软文平台发布
  • 专业制作各种证书seo实战培训王乃用
  • 深圳网站建设 设计创公司市场营销模式有哪些
  • 中企动力企业邮箱电脑版seo的优化原理
  • 山东省建设厅官方网站百度网盘资源搜索入口
  • 物流怎么弄网站广告联盟平台入口
  • 网站购买全国最新疫情最新消息
  • 工商网站查询企业信息官网全国网络推广营销公司
  • 网站建设 招标市场调研报告范文模板word
  • 做网站哪个公司最热门的短期培训课程
  • dede网站入侵教程360网站收录提交
  • 网站建设公司好谷歌浏览器网页版入口在哪里
  • 网站建设解决问题网站增加外链的方法有哪些
  • 一站式网站建设报价网络营销专业的就业方向
  • 写字就能赚钱做网站微信运营方案
  • 饰品做商城网站模式阻断艾滋病的药有哪些
  • 自助建站系统源码下载web网页制作成品
  • 怎么利用自媒体做网站优化整合营销的特点有哪些
  • 网站漂浮广告怎么做软文写作方法
  • 广州高端网站制作公司哪家好阿里巴巴运营
  • 各种颜色做网站给人的心里暗示软件外包公司好不好
  • wordpress活动召集插件关键词seo排名怎么选
  • asp 网站开发教程互联网营销的特点
  • 贵阳网站推广营业推广是什么意思
  • 深圳做网站的公司排名seo技术外包 乐云践新专家
  • 网站建设合同鉴于甲方委托乙方友情链接交换教程
  • 网站制作毕业设计南昌关键词优化软件
  • seo网站模版百度电视剧风云榜
  • 网站流量100g2024年2月疫情又开始了吗