podman笔记

#容器镜像加速服务
https://cr.console.aliyun.com/cn-zhangjiakou/instances/mirrors?accounttraceid=df5460ffc1564ef18daafa6f0fab9384lwno

podman build -f Dockerfile -t ubi-with-nano
podman run ubi8/ubi
podman ps -a

#检查正在运行的容器
podman inspect -l |grep -i ipaddress
podman attach xxxx

#导出导入
podman save > php8.1.tar php:8.1
docker load < php8.1.tar

#停止指定pod或者所有pod(其中的容器也随之停止)

podman pod stop HelloWorld
podman pod stop $(podman pod ps -q)

#删除指定Pod或者删除所有已经停止的pod

podman pod rm -f HugoBlog
podman pod rm $(podman pod ps -q)
podman rm $(podman ps -a -q)

#这里需要修改podman的配置文件,/etc/containers/registries.conf

unqualified-search-registries = ["docker.io"]
[[registry]]
prefix="docker.io"
location="fi54miqv.mirror.aliyuncs.com"
csdn.net/liqz2009/article/details/126567221

#给go项目打最小docker镜像
https://www.bilibili.com/read/cv17024112

#查看所有容器IP
docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)

dsG5CrIhXayAC4I9
grant all privileges on . to root@'%';

#ubuntu更换源
sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
apt-get clean
apt-get update

#mysql密码问题
https://blog.csdn.net/qq_54202620/article/details/122729704

发表评论