2
Docker 常用操作的备忘录
source link: https://sexywp.com/docker-memo.htm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
算法 | LNMP | Flutter | Mac
Docker 常用操作的备忘录
从公有仓库拉取镜像:
docker pull redis:7.0.5-alpine3.16 --platform linux/amd64
查看本地的镜像:
docker images
删除一个本地镜像:
docker image rm <REPOSITORY>:<TAG>
查看本地的所有容器:
docker container ls --all
给本地镜像打上一个 tag:
docker tag redis:7.0.5-alpine3.16 registry.selfhost.com/redis:7.0.5-alpine3.16
将镜像推送到私有仓库:
docker push registry.selfhost.com/redis:7.0.5-alpine3.16
注意:使用 Apple Silicon 的 MacBook Pro (M1/2) 时候,docker
命令,默认拉取的镜像,构建的镜像,都是 linux/arm64/v8
的,但是,服务器开发的运行环境往往是 linux/amd64
的,注意交叉编译的问题。
发布于 2022/09/27作者 Charles分类 工作相关标签 docker
此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK