logo

首页 文章
2022-07-11
docker

使用buildx创建多架构镜像

参考文档1:https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images

参考文档2:https://docs.docker.com/desktop/multi-arch/

需求

  • 内核版本 >= 4.8
  • 通过 https://docs.docker.com/engine/install/ 安装docker,或参考 https://docs.docker.com/build/buildx/install/ 安装 buildx 插件

步骤

1. 启用 binfmt_misc

1
docker run --privileged --rm tonistiigi/binfmt --install all

2. 创建并切换构建器

1
2
3
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap

3. 构建镜像

1
docker buildx build --platform linux/amd64,linux/arm64 -t openspug/spug-service --push .
分享
  • docker
前一篇
Python使用openpyxl读写excel
后一篇
flex布局元素被挤压

分类

  • docker
  • python
  • 前端
  • 后端
  • 小程序
  • 随记

标签

  • ORM
  • antd
  • css
  • django
  • docker
  • excel
  • javascript
  • openpyxl
  • python
  • react
  • rsync
  • 阿里云

标签云

ORM antd css django docker excel javascript openpyxl python react rsync 阿里云

归档

  • 十一月 2024
  • 九月 2024
  • 六月 2024
  • 四月 2024
  • 十二月 2023
  • 八月 2023
  • 五月 2023
  • 四月 2023
  • 三月 2023
  • 二月 2023
  • 七月 2022
  • 五月 2022
  • 四月 2022
  • 三月 2022
  • 二月 2022
  • 一月 2022

最新文章

  • openpyxl单元格宽高自适应
  • (no title)
  • 阿里云全站加速缓存配置
  • Centos7编译安装Python
  • EventSource入门
  • Python logging入门
  • Django ORM入门
  • HTTP请求参数解析器实现
  • 不同路径写法对Rsync的影响
  • Xtermjs使用入门
豫ICP备16000449号-2 © 2024 leiem.cn
首页 文章