docker基础镜像

一、配置 docker

本地源

[docker-ce-stable]
name=Docker CE Stable
baseurl=http://10.35.186.181/docker-ce-stable/
enabled=1
gpgcheck=0

配置阿里云Docker Yum源

yum install -y yum-utils device-mapper-persistent-data lvm2 git
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

2、安装完成后启动
启动Docker服务:#systemctl enable docker#systemctl start docker
查看Docker版本
[root@localhost ~]# docker -v
Docker version 27.0.3, build 7d4bcd8[root@localhost ~]# docker version
Client: Docker Engine - CommunityVersion:           27.0.3API version:       1.46Go version:        go1.21.11Git commit:        7d4bcd8Built:             Sat Jun 29 00:04:07 2024OS/Arch:           linux/amd64Context:           defaultServer: Docker Engine - CommunityEngine:Version:          27.0.3API version:      1.46 (minimum version 1.24)Go version:       go1.21.11Git commit:       662f78cBuilt:            Sat Jun 29 00:02:31 2024OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.7.18GitCommit:        ae71819c4f5e67bb4d5ae76a6b735f29cc25774erunc:Version:          1.7.18GitCommit:        v1.1.13-0-g58aa920docker-init:Version:          0.19.0GitCommit:        de40ad0

查看docker运行状态
[root@localhost ~]# docker info
Client: Docker Engine - CommunityVersion:    27.0.3Context:    defaultDebug Mode: falsePlugins:buildx: Docker Buildx (Docker Inc.)Version:  v0.15.1Path:     /usr/libexec/docker/cli-plugins/docker-buildxcompose: Docker Compose (Docker Inc.)Version:  v2.28.1Path:     /usr/libexec/docker/cli-plugins/docker-composeServer:Containers: 4Running: 0Paused: 0Stopped: 4Images: 2Server Version: 27.0.3Storage Driver: overlay2Backing Filesystem: xfsSupports d_type: trueUsing metacopy: falseNative Overlay Diff: trueuserxattr: falseLogging Driver: json-fileCgroup Driver: systemdCgroup Version: 2Plugins:Volume: localNetwork: bridge host ipvlan macvlan null overlayLog: awslogs fluentd gcplogs gelf journald json-file local splunk syslogSwarm: inactiveRuntimes: io.containerd.runc.v2 runcDefault Runtime: runcInit Binary: docker-initcontainerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774erunc version: v1.1.13-0-g58aa920init version: de40ad0Security Options:seccompProfile: builtincgroupnsKernel Version: 5.14.0-427.13.1.el9_4.x86_64Operating System: Rocky Linux 9.4 (Blue Onyx)OSType: linuxArchitecture: x86_64CPUs: 2Total Memory: 1.703GiBName: localhost.localdomainID: bc83f6a9-af90-4cbf-aaad-f9025ff827e2Docker Root Dir: /docker-dataDebug Mode: falseUsername: fucancan987Experimental: falseInsecure Registries:127.0.0.0/8Registry Mirrors:https://do.nark.eu.org/https://dc.j8.work/https://pilvpemn.mirror.aliyuncs.com/https://docker.m.daocloud.io/https://dockerproxy.com/https://docker.mirrors.ustc.edu.cn/https://docker.nju.edu.cn/Live Restore Enabled: false

3、生产 doker 的配置环境(加入多个国内镜像源)

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": [
        "https://do.nark.eu.org",
        "https://dc.j8.work",
        "https://pilvpemn.mirror.aliyuncs.com",
        "https://docker.m.daocloud.io",
        "https://dockerproxy.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://docker.nju.edu.cn"
   ],
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
#注意:一定注意编码问题,出现错误---查看命令:journalctl -amu docker 即可发现错误

4、登入登出 docker hub

[root@localhost ~]# docker login
Log in with your Docker ID or email address to push and pull images from Docker Hub. If you don't have a Docker ID, head over to er.com/ to create one.
You can log in with your password or a Personal Access Token (PAT). Using a limited-scope PAT grants better security and is requitions using SSO. Learn more at https://docs.docker.com/go/access-tokens/Username: fucancan987
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-storesLogin Succeeded[root@localhost ~]# docker logout
Removing login credentials for https://index.docker.io/v1/

5、配置数据存放位置

vim /usr/lib/systemd/system/docker.service
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --data-root=/docker-data #加入此参数可以设定docker的文件目录位置,如果没有需要创建
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutStartSec=0
RestartSec=2
Restart=always

配置保存完毕后需要初始化
systemctl daemon-reload

二、docker 操作 

1、查看当前 docker 镜像

[root@localhost ~]# docker images
REPOSITORY             TAG       IMAGE ID       CREATED       SIZE
fucancan987/practice   nginx     fffffc90d343   3 weeks ago   188MB
nginx                  latest    fffffc90d343   3 weeks ago   188MB
test                   latest    fffffc90d343   3 weeks ago   188MB
rockylinux             latest    210996f98b85   2 years ago   205MB

 2、运行 docker 镜像

直接运行容器,推出后容器就会关闭

[root@localhost ~]# docker run -it rockylinux:latest /bin/bash
[root@5228639101f2 /]# ping www.baidu.com
PING www.a.shifen.com (183.2.172.185) 56(84) bytes of data.
64 bytes from 183.2.172.185 (183.2.172.185): icmp_seq=1 ttl=127 time=42.1 ms
64 bytes from 183.2.172.185 (183.2.172.185): icmp_seq=2 ttl=127 time=74.3 ms
^C
--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 42.088/58.207/74.326/16.119 ms
[root@5228639101f2 /]# exit
exit

-d 后台运行容器

[root@localhost ~]# docker run -itd rockylinux:latest /bin/bash
93d642bf9d8d28206ffdf0f8ae3a8febc415d7428b28a89743c5804521327086
[root@localhost ~]# docker container ls
CONTAINER ID   IMAGE               COMMAND       CREATED          STATUS          PORTS     NAMES
93d642bf9d8d   rockylinux:latest   "/bin/bash"   59 seconds ago   Up 58 seconds             sharp_hertz
[root@localhost ~]# docker attach sharp_hertz
[root@93d642bf9d8d /]# exit
exit[root@localhost ~]# docker ps -a
CONTAINER ID   IMAGE               COMMAND                  CREATED          STATUS                      PORTS     NAMES
b46abdcb5d30   rockylinux:latest   "/bin/bash"              12 minutes ago   Up 12 minutes                         wizardly_ganguly
[root@localhost ~]# docker exec -it b46abdcb5d30 /bin/bash

3、停止 、删除 docker 镜像 stop rm

[root@localhost docker-data]# docker ps
CONTAINER ID   IMAGE               COMMAND       CREATED          STATUS          PORTS     NAMES
b46abdcb5d30   rockylinux:latest   "/bin/bash"   42 minutes ago   Up 42 minutes             wizardly_ganguly
[root@localhost docker-data]# docker stop b46abdcb5d30
b46abdcb5d30
[root@localhost docker-data]# docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES[root@localhost docker-data]# docker ps -a
CONTAINER ID   IMAGE               COMMAND                  CREATED          STATUS                      PORTS     NAMES
b46abdcb5d30   rockylinux:latest   "/bin/bash"              43 minutes ago   Exited (0) 13 seconds ago             wizardly_ganguly
93d642bf9d8d   rockylinux:latest   "/bin/bash"              47 minutes ago   Exited (0) 43 minutes ago             sharp_hertz
5228639101f2   rockylinux:latest   "/bin/bash"              48 minutes ago   Exited (0) 47 minutes ago             agitated_wu
f888743a2d22   rockylinux          "/bin/bash"              5 hours ago      Exited (127) 5 hours ago              admiring_goldstine
2ea9b1b927ad   nginx               "/docker-entrypoint.…"   5 hours ago      Exited (0) 5 hours ago                some-nginx
04c1365e723c   nginx:latest        "/docker-entrypoint.…"   5 hours ago      Exited (127) 5 hours ago              confident_lamarr
a3cc60263ed6   nginx:latest        "/docker-entrypoint.…"   5 hours ago      Exited (0) 5 hours ago                cranky_lamport
[root@localhost docker-data]# docker rm b46abdcb5d30
b46abdcb5d30
[root@localhost docker-data]# docker ps -a
CONTAINER ID   IMAGE               COMMAND                  CREATED          STATUS                      PORTS     NAMES
93d642bf9d8d   rockylinux:latest   "/bin/bash"              47 minutes ago   Exited (0) 44 minutes ago             sharp_hertz
5228639101f2   rockylinux:latest   "/bin/bash"              48 minutes ago   Exited (0) 48 minutes ago             agitated_wu
f888743a2d22   rockylinux          "/bin/bash"              5 hours ago      Exited (127) 5 hours ago              admiring_goldstine
2ea9b1b927ad   nginx               "/docker-entrypoint.…"   5 hours ago      Exited (0) 5 hours ago                some-nginx
04c1365e723c   nginx:latest        "/docker-entrypoint.…"   5 hours ago      Exited (127) 5 hours ago              confident_lamarr
a3cc60263ed6   nginx:latest        "/docker-entrypoint.…"   5 hours ago      Exited (0) 5 hours ago                cranky_lamport
[root@localhost docker-data]#

3、将 docker 镜像打包到本地 docker save

[root@localhost ~]# docker save rockylinux:latest > rockylinux_93.tar.gz
[root@localhost ~]# ls
 rockylinux_93.tar.gz 

4 、导入本地 docker 包 

[root@localhost ~]# docker load -i rockylinux_93.tar.gz
65dbea0a4b39: Loading layer [==================================================>]  211.3MB/211.3MB
Loaded image: rockylinux:latest
[root@localhost ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
rockylinux   latest    210996f98b85   2 years ago   205MB

 三、上传镜像

1、dockerhub 创建账户,创建一个镜像仓库

1.1 创建 tag 名

docker tag REPOSITORY:TAG your REPOSITORY:new tag

打一个 tag,告诉是你自己创建的镜像空间下的

[root@localhost docker-data]# docker tag rockylinux:9.3 fucancan987/practice:9.3
[root@localhost docker-data]# docker login
Log in with your Docker ID or email address to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com/ to create one.
You can log in with your password or a Personal Access Token (PAT). Using a limited-scope PAT grants better security and is required for organizations using SSO. Learn more at https://docs.docker.com/go/access-tokens/

Username: fucancan987
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-stores

Login Succeeded
[root@localhost docker-data]# docker images
REPOSITORY             TAG       IMAGE ID       CREATED       SIZE
mysql                  8.4       da8f2a99cf39   2 weeks ago   583MB
practice               9.3       da8f2a99cf39   2 weeks ago   583MB
fucancan987/practice   nginx     fffffc90d343   3 weeks ago   188MB
nginx                  latest    fffffc90d343   3 weeks ago   188MB
test                   latest    fffffc90d343   3 weeks ago   188MB
rockylinux             latest    210996f98b85   2 years ago   205MB

推送到自己的镜像仓库 

[root@localhost docker-data]# docker push practice:9.3
The push refers to repository [docker.io/library/practice]
44343de3ea1d: Preparing
denied: requested access to the resource is denied

第一次默认推送推送失败,因为推送的命名空间是library,lirary是公共的、命名空间,没有推送的权限 

[root@localhost docker-data]# docker push fucancan987/practice:9.3
The push refers to repository [docker.io/fucancan987/practice]
 

docker tag [IMAGE] 镜像仓库名/命名空间/REPOSITORY:【镜像版本号,可自定义】 ##打 tag

docker push 镜像仓库名/命名空间/REPOSITORY:【镜像版本号,可自定义】 ##上传

docker pull REPOSITORY:【镜像版本号,可自定义】 ##拉取

四、镜像管理 

1、查找镜像 docker search image_name 【-f stars=number】

[root@localhost ~]# docker search centos
NAME                                   DESCRIPTION                                     STARS     OFFICIAL
centos                                 DEPRECATED; The official build of CentOS.       7744      [OK]
kasmweb/centos-7-desktop               CentOS 7 desktop for Kasm Workspaces            45
rancher/os-centosconsole                                                               0
bellsoft/liberica-openjdk-centos       Liberica is a 100% open-source Java implemen…   4
bellsoft/liberica-openjre-centos       Liberica is a 100% open-source Java implemen…   3
bitnami/centos-base-buildpack          Centos base compilation image                   0
kasmweb/core-centos-7                  CentOS 7 base image for Kasm Workspaces         6
rancher/vm-centos                                                                      0
dokken/centos-7                        CentOS 7 image for kitchen-dokken               10
spack/centos7                          CentOS 7 with Spack preinstalled                2
dokken/centos-8                        CentOS 8 image for use with Test Kitchen's k…   6
dokken/centos-6                        EOL: CentOS 6 image for kitchen-dokken          0
dokken/centos-stream-8                 EOL: CentOS Stream 8 image for use with Test…   5
ustclug/centos                         Official CentOS Image with USTC Mirror          0
dokken/centos-stream-9                 CentOS Stream 9 image for use with Test Kitc…   10
atlas/centos7-atlasos                  ATLAS CentOS 7 Software Development OS          3
codecentric/springboot-maven3-centos   STI builder image for building and running m…   13
spack/centos6                          CentOS 6 with Spack preinstalled                1
apache/couchdbci-centos                Apache CouchDB CI CentOS                        0
vespaengine/vespa-build-centos7        Docker image for building Vespa on CentOS 7.    0
eclipse/centos_jdk8                    CentOS, JDK8, Maven 3, git, curl, nmap, mc, …   5
corpusops/centos                       centos corpusops baseimage                      0
corpusops/centos-bare                  https://github.com/corpusops/docker-images/     0
cincproject/omnibus-centos             CentOS Omnibus builder                          0
starlingx/stx-centos                   StarlingX is an open source distributed clou…   0
##过滤点赞数大于100的镜像源
[root@localhost ~]# docker search centos -f stars=100
NAME      DESCRIPTION                                 STARS     OFFICIAL
centos    DEPRECATED; The official build of CentOS.   7744      [OK]

2、查看当前服务器镜像

[root@localhost ~]# docker images
REPOSITORY             TAG       IMAGE ID       CREATED        SIZE
mysql                  8.4       da8f2a99cf39   2 weeks ago    583MB
mysqltest              8.4       da8f2a99cf39   2 weeks ago    583MB
mysql                  8.0.38    6c54cbcf775a   2 weeks ago    572MB
fucancan987/practice   nginx     fffffc90d343   3 weeks ago    188MB
nginx                  latest    fffffc90d343   3 weeks ago    188MB
test                   latest    fffffc90d343   3 weeks ago    188MB
fucancan987/practice   9.3       9cc24f05f309   7 months ago   176MB
practice               9.3       9cc24f05f309   7 months ago   176MB
rockylinux             9.3       9cc24f05f309   7 months ago   176MB
rockylinux             latest    210996f98b85   2 years ago    205MB
 

[root@localhost ~]# docker image ls
REPOSITORY             TAG       IMAGE ID       CREATED        SIZE
mysql                  8.4       da8f2a99cf39   2 weeks ago    583MB
mysqltest              8.4       da8f2a99cf39   2 weeks ago    583MB
mysql                  8.0.38    6c54cbcf775a   2 weeks ago    572MB
test                   latest    fffffc90d343   3 weeks ago    188MB
fucancan987/practice   nginx     fffffc90d343   3 weeks ago    188MB
nginx                  latest    fffffc90d343   3 weeks ago    188MB
rockylinux             9.3       9cc24f05f309   7 months ago   176MB
fucancan987/practice   9.3       9cc24f05f309   7 months ago   176MB
practice               9.3       9cc24f05f309   7 months ago   176MB
rockylinux             latest    210996f98b85   2 years ago    205MB

[root@localhost ~]# docker image list
REPOSITORY             TAG       IMAGE ID       CREATED        SIZE
mysql                  8.4       da8f2a99cf39   2 weeks ago    583MB
mysqltest              8.4       da8f2a99cf39   2 weeks ago    583MB
mysql                  8.0.38    6c54cbcf775a   2 weeks ago    572MB
test                   latest    fffffc90d343   3 weeks ago    188MB
fucancan987/practice   nginx     fffffc90d343   3 weeks ago    188MB
nginx                  latest    fffffc90d343   3 weeks ago    188MB
fucancan987/practice   9.3       9cc24f05f309   7 months ago   176MB
practice               9.3       9cc24f05f309   7 months ago   176MB
rockylinux             9.3       9cc24f05f309   7 months ago   176MB
rockylinux             latest    210996f98b85   2 years ago    205MB

3、拉取镜像信息 docker pull image_name:tagname

4、查看镜像详细信息 docker inspect image_name:tagname

5、删除镜像 docker rmi REPOSITORY:tagnam

 有容器还在使用镜像会出现无法删除,此时需要强制删除镜像,删除过后,镜像释放自动清空
docker rmi -f REPOSITORY:tagname

6、删除所有镜像 docker rmi $(docker images -q) 

显示所有的镜像id
[root@localhost ~]# docker images -q
da8f2a99cf39
da8f2a99cf39
6c54cbcf775a
fffffc90d343
fffffc90d343
fffffc90d343
9cc24f05f309
9cc24f05f309
9cc24f05f309
210996f98b85

7、修改 tag docker tag image_id REPOSITORY:TAG

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/382900.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SpringBoot是如何简化Spring开发的,以及SpringBoot的特性以及源码分析

目录 1.什么是springboot 2.配置文件的优先级 2.1 配置文件的优先级 2.2 系统配置以及命令行配置 3.Bean对象的管理 3.1 如何获取对应的bean对象 3.2 bean的作用域 3.3 声明第三方bean Component 及衍生注解 与 Bean注解使用场景&#xff1f; 如何查看项目已有的bean对象&…

【C++】:AVL树的深度解析及其实现

目录 前言一&#xff0c;AVL树的概念二&#xff0c;AVL树节点的定义三&#xff0c;AVL树的插入3.1 第一步3.2 第二步 四&#xff0c;AVL树的旋转4.1 右单旋4.2 左单旋4.3 右左双旋4.4 左右双旋4.5 插入代码的完整实现4.6 旋转总结 五&#xff0c;AVL树的验证六&#xff0c;实现…

埃文科技受邀出席2024年河南省工业领域网络和数据安全政策宣贯会

2024年7月18日&#xff0c;由河南省工业和信息化厅主办&#xff0c;河南省工业信息安全产业发展联盟、河南省信息安全产业协会承办的2024年河南省工业领域网络和数据安全政策宣贯会在郑州召开&#xff0c;活动旨在提升河南省工业领域网络和数据安全保护能力&#xff0c;助力企业…

python模拟12306订火车票【代码示例】

实现效果&#xff1a;从给定的车次信息里选择车票&#xff0c;如果车票在车次信息里&#xff0c;系统提示填写乘车人&#xff0c;并出具购票凭据&#xff1b;如果车票不在车次里&#xff0c;提示车次不存在。 代码 # 定义一个字典&#xff0c;存储车次信息 ticket{G1569:[北京…

2023年码蹄杯专科组第一场初赛 解题报告 | 珂学家

前言 题解 有几道感觉还行&#xff0c;不过数据有些弱 安全验证&#xff08;字符串&#xff09;旅行&#xff08;图论&#xff09; 安全验证 难度: 钻石 思路: 字符串hash 二分 先提炼下题意: 即存在字符串T, 它即是S的前缀, 也是S的后缀, 同时在S[1:-2]中存在子数组ST…

刷题了:344.反转字符串|541. 反转字符串II|卡码网:54.替换数字

344.反转字符串 题目链接:https://leetcode.cn/problems/reverse-string/description/ 文章讲解:https://programmercarl.com/0344.%E5%8F%8D%E8%BD%AC%E5%AD%97%E7%AC%A6%E4%B8%B2.html 视频讲解:https://www.bilibili.com/video/BV1fV4y17748/?spm_id_from333.788&vd_s…

PostgreSQL简介和安装

一、Postgresql简介&#xff1a; 1、PostgreSql是功能强大的&#xff0c;开源的关系型数据库&#xff0c;底层基于C语言实现&#xff1b; 2、开源&#xff1a;允许对PostgreSql进行封装&#xff0c;用于商业收费&#xff1b; 3、版本迭代速度快&#xff0c;正式版本已经到15.R…

Linux网络命令

文章目录 Linux网络命令1、ping 命令2、netstat命令3、pidof Linux网络命令 1、ping 命令 使用命令&#xff1a;ping [-c 次数]网址或者IP地址。可以查看当前客户端与IP的网络是否可达。 ping -c 5 www.baidu.com PING www.a.shifen.com (157.148.69.74) 56(84) bytes of data…

嵌入式代码编译过程概述

嵌入式代码编译过程概述 前言一、c/c编译过程1.1 代码编译过程1.1.1 预处理1.1.2 编译阶段1.1.3 汇编阶段1.1.4 链接阶段 1.2 编译过程中的编译工具GCC /Gclang/clangMinGW / MSVCArm GNU ToolchainarmccMAKE/CMAKE/qmake 二、常见IDE编译过程2.1 keil代码编译过程2.2 windows-…

【Hot100】LeetCode—322. 零钱兑换

目录 题目1- 思路2- 实现⭐322. 零钱兑换——题解思路 3- ACM 实现 题目 原题连接&#xff1a;322. 零钱兑换 1- 思路 思路 其中 amount 是背包容量 ——> 其中 nums 数组代表的背包重量 2- 实现 ⭐322. 零钱兑换——题解思路 class Solution {public int coinChange(in…

2023 N1CTF-n1proxy

文章目录 参考rsa握手rust_proxy源码公匙交换和签名会话钥匙后续通信生命周期和裸指针代码审计漏洞点 libc-2.27.so大致思路&#xff08;exp还有变化&#xff09;调试exp泄露libc写free_hook执行命令exp 参考 https://github.com/Nu1LCTF/n1ctf-2023/tree/main/pwn/n1proxy ht…

算法学习day19

一、通过删除字母匹配到字符字典中的最大值 给你一个字符串 s 和一个字符串数组 dictionary &#xff0c;找出并返回 dictionary 中最长的字符串&#xff0c;该字符串可以通过删除 s 中的某些字符得到。 如果答案不止一个&#xff0c;返回长度最长且字母序最小的字符串。如果…

数据库——单表查询

一、建立数据库mydb8_worker mysql> use mydb8_worker; 二、建立表 1.创建表 mysql> create table t_worker(department_id int(11) not null comment 部门号,-> worder_id int(11) primary key not null comment 职工号,-> worker_date date not null comment…

【多模态】CLIP-KD: An Empirical Study of CLIP Model Distillation

论文&#xff1a;CLIP-KD: An Empirical Study of CLIP Model Distillation 链接&#xff1a;https://arxiv.org/pdf/2307.12732 CVPR 2024 Introduction Motivation&#xff1a;使用大的Teacher CLIP模型有监督蒸馏小CLIP模型&#xff0c;出发点基于在资源受限的应用中&…

CTF-NSSCTF题单[GKCTF2020]

[GKCTF 2020]CheckIN 这道题目考察&#xff1a;php7-gc-bypass漏洞 打开这道题目&#xff0c;开始以为考察反序列化&#xff0c;但实际并不是&#xff0c;这里直接用$_REQUEST传入了参数便可以利用了。这里出现了一个eval&#xff08;&#xff09;函数&#xff0c;猜测考察命…

spring部分源码分析及Bean的生命周期理解

前言&#xff1a; 本文整体框架是通过refresh方法这个入口进入分析&#xff1a;分析IOC容器的创建及一些Bean的生命周期的知识点&#xff0c;写得确实一般般&#xff0c;感觉自己的有些前置知识并没有理解的很到位&#xff0c;所以&#xff0c;这篇文件先记录一下&#xff0c;…

MAT使用

概念 Shallow heap & Retained Heap Shallow Heap就是对象本身占用内存的大小。 Retained Heap就是当前对象被GC后&#xff0c;从Heap上总共能释放掉的内存(表示如果一个对象被释放掉&#xff0c;那会因为该对象的释放而减少引用进而被释放的所有的对象&#xff08;包括…

CentOS 8中 更新或下载时报错:为仓库 ‘appstream‘ 下载元数据失败 : Cannot prepare internal mirrorlist

一、错误重现 CentOS Stream 8 - AppStream 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository appstream: - Curl error (6): Couldnt resolve host name for http://mirrorlis…

docker tomcat 404

HTTP 404状态码表示“Not Found”&#xff0c;即服务器无法找到请求的页面。 当用户尝试访问一个不存在的网页时&#xff0c;服务器会返回这个状态码。这个状态码是HTTP协议的一部分&#xff0c;用于告知客户端&#xff08;通常是浏览器&#xff09;服务器无法完成请求。404状…