由于mac M2 是arm 架构
- oralce 没有oracle-xe 的镜像 只有amd64
安装docker
- 安装docker-for-mac
启用 docker-buildx
- docker-damen.json
- experimental: true
- 重启
查看 docker buildx
- docker version
- experimental = True
- docker buildx version
- ~/.docker/cli-plugins/docker-buildx
- 开启成功
准备dockerfile
FROM node:lts-buster-slim
WORKDIR /app
RUN mkdir /app && echo "hello,world">/app/hello.txt
CMD ["cat", "/app/hello.txt"]
准备任务编译节点
docker buildx create --use --name build-node-example --driver docker-container
docker buildx ls
注意先登录dockerhub
- docker login
开始打包
docker buildx build -t fleyx/open-renamer:0.8 --platform linux/amd64,linux/arm64 --push .
标签:--,app,buildx,mac,构建,镜像,docker,hello From: https://www.cnblogs.com/guanchaoguo/p/17251458.html