fix: docker buildx
This commit is contained in:
22
docs/99-reference/tips.md
Normal file
22
docs/99-reference/tips.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
如果你想安装并使用较新版本的 Docker 和 buildx 插件,可以按照以下步骤进行:
|
||||||
|
|
||||||
|
1.首先安装 Docker buildx 插件:
|
||||||
|
# 为当前用户创建 CLI 插件目录
|
||||||
|
```sh
|
||||||
|
mkdir -p ~/.docker/cli-plugins/
|
||||||
|
```
|
||||||
|
|
||||||
|
# 下载 buildx 二进制文件
|
||||||
|
```sh
|
||||||
|
curl -SL https://github.com/docker/buildx/releases/download/v0.10.4/buildx-v0.10.4.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx
|
||||||
|
```
|
||||||
|
|
||||||
|
# 添加执行权限
|
||||||
|
```sh
|
||||||
|
chmod +x ~/.docker/cli-plugins/docker-buildx
|
||||||
|
```
|
||||||
|
|
||||||
|
2.验证安装:
|
||||||
|
```sh
|
||||||
|
docker buildx version
|
||||||
|
```
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
docker build -t ubuntu:12.04 -f Dockerfile .
|
docker buildx build --load -t ubuntu:12.04 -f Dockerfile .
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|||||||
Reference in New Issue
Block a user