国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【docker錯(cuò)誤解決系列】 ‘buildx‘ is not a docker command.

這篇具有很好參考價(jià)值的文章主要介紹了【docker錯(cuò)誤解決系列】 ‘buildx‘ is not a docker command.。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

問題

[root@ningan ~]# docker buildx
docker: 'buildx' is not a docker command.
See 'docker --help'

環(huán)境

[root@ningan ~]# uname -a
Linux ningan 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@ningan ~]# docker version
Client:
 Version:           20.10.21
 API version:       1.41
 Go version:        go1.18.1
 Git commit:        20.10.21-0ubuntu1~18.04.3
 Built:             Thu Apr 27 05:50:21 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.21
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.1
  Git commit:       20.10.21-0ubuntu1~18.04.3
  Built:            Thu Apr 27 05:36:22 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.2
  GitCommit:        de8046a5501db9e0e478e1c10cbcfb21af4c6b2d
 runc:
  Version:          1.1.1
  GitCommit:        v1.1.0-20-g52de29d7
 docker-init:
  Version:          0.19.0
  GitCommit:        
[root@ningan ~]# 

解決辦法

嘗試1:修改~/.docker /config.json

[root@ningan ~]# mkdir ~/.docker 
mkdir: cannot create directory ‘/root/.docker’: File exists
[root@ningan ~]# cd .docker/
[root@ningan .docker]# ll
total 24
drwx------  3 root root  4096 Jan 23 14:20 ./
drwx------ 68 root root  4096 Feb 20 10:53 ../
-rw-------  1 root root   447 Jan 23 14:20 config.json
drwxr-xr-x 85 root root 12288 Jan 23 14:55 manifests/

[root@ningan ~]# vi config.json
{
  ...
  "experimental": "enabled"
}
[root@ningan .docker]# docker buildx version
docker: 'buildx' is not a docker command.
See 'docker --help'
[root@ningan .docker]# docker version
Client:
 Version:           20.10.21
 API version:       1.41
 Go version:        go1.18.1
 Git commit:        20.10.21-0ubuntu1~18.04.3
 Built:             Thu Apr 27 05:50:21 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.21
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.1
  Git commit:       20.10.21-0ubuntu1~18.04.3
  Built:            Thu Apr 27 05:36:22 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.2
  GitCommit:        de8046a5501db9e0e478e1c10cbcfb21af4c6b2d
 runc:
  Version:          1.1.1
  GitCommit:        v1.1.0-20-g52de29d7
 docker-init:
  Version:          0.19.0
  GitCommit:        

嘗試2:exporter DOCKER_CLI_EXPERIMENTAL=enabled

[root@ningan .docker]# export DOCKER_CLI_EXPERIMENTAL=enabled
[root@ningan .docker]# 
[root@ningan .docker]# docker buildx version
docker: 'buildx' is not a docker command.
See 'docker --help'
[root@ningan .docker]# docker version
Client:
 Version:           20.10.21
 API version:       1.41
 Go version:        go1.18.1
 Git commit:        20.10.21-0ubuntu1~18.04.3
 Built:             Thu Apr 27 05:50:21 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.21
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.1
  Git commit:       20.10.21-0ubuntu1~18.04.3
  Built:            Thu Apr 27 05:36:22 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.2
  GitCommit:        de8046a5501db9e0e478e1c10cbcfb21af4c6b2d
 runc:
  Version:          1.1.1
  GitCommit:        v1.1.0-20-g52de29d7
 docker-init:
  Version:          0.19.0
  GitCommit:   
[root@ningan .docker]# docker info |grep Experimental
WARNING: No swap limit support
 Experimental: false     

嘗試3:修改/etc/docker/daemon.json --> Experimental成功開啟

[root@ningan .docker]# vi /etc/docker/daemon.json
{
  "experimental": true,
  ...
}
[root@ningan .docker]# systemctl restart docker
[root@ningan .docker]# docker info |grep Experimental
WARNING: No swap limit support
 Experimental: true
[root@ningan ~]# docker version
Client:
 Version:           20.10.21
 API version:       1.41
 Go version:        go1.18.1
 Git commit:        20.10.21-0ubuntu1~18.04.3
 Built:             Thu Apr 27 05:50:21 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.21
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.1
  Git commit:       20.10.21-0ubuntu1~18.04.3
  Built:            Thu Apr 27 05:36:22 2023
  OS/Arch:          linux/amd64
  Experimental:     true                      ###########################  這個(gè)地方變成true了
 containerd:
  Version:          v1.6.2
  GitCommit:        de8046a5501db9e0e478e1c10cbcfb21af4c6b2d
 runc:
  Version:          1.1.1
  GitCommit:        v1.1.0-20-g52de29d7
 docker-init:
  Version:          0.19.0
  GitCommit:  
[root@ningan ~]# docker buildx version
docker: 'buildx' is not a docker command.
See 'docker --help      

嘗試4:開啟binfmt

[root@ningan ~]# docker run --rm --privileged tonistiigi/binfmt:latest --install all
Unable to find image 'tonistiigi/binfmt:latest' locally
latest: Pulling from tonistiigi/binfmt
8d4d64c318a5: Pull complete 
e9c608ddc3cb: Pull complete 
Digest: sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55
Status: Downloaded newer image for tonistiigi/binfmt:latest
installing: riscv64 OK
installing: mips64le OK
installing: ppc64le OK
installing: mips64 OK
installing: arm64 OK
installing: arm OK
installing: s390x OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "jar",
    "llvm-6.0-runtime.binfmt",
    "python2.7",
    "python3.6",
    "qemu-aarch64",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
[root@ningan ~]# 
[root@ningan ~]# ls -l /proc/sys/fs/binfmt_misc/
total 0
-rw-r--r-- 1 root root 0 Feb  4 21:40 jar
-rw-r--r-- 1 root root 0 Feb  4 21:40 llvm-6.0-runtime.binfmt
-rw-r--r-- 1 root root 0 Feb  4 21:40 python2.7
-rw-r--r-- 1 root root 0 Feb  4 21:40 python3.6
-rw-r--r-- 1 root root 0 Feb 20 11:29 qemu-aarch64
-rw-r--r-- 1 root root 0 Feb 20 11:29 qemu-arm
-rw-r--r-- 1 root root 0 Feb 20 11:29 qemu-mips64
-rw-r--r-- 1 root root 0 Feb 20 11:29 qemu-mips64el
-rw-r--r-- 1 root root 0 Feb 20 11:29 qemu-ppc64le
-rw-r--r-- 1 root root 0 Feb 20 11:29 qemu-riscv64
-rw-r--r-- 1 root root 0 Feb 20 11:29 qemu-s390x
--w------- 1 root root 0 Feb  4 21:40 register
-rw-r--r-- 1 root root 0 Feb  4 21:40 status
[root@ningan ~]# 
[root@ningan ~]# grep -r "enabled" /proc/sys/fs/binfmt_misc/ 
/proc/sys/fs/binfmt_misc/qemu-s390x:enabled
/proc/sys/fs/binfmt_misc/qemu-arm:enabled
/proc/sys/fs/binfmt_misc/qemu-aarch64:enabled
/proc/sys/fs/binfmt_misc/qemu-mips64:enabled
/proc/sys/fs/binfmt_misc/qemu-ppc64le:enabled
/proc/sys/fs/binfmt_misc/qemu-mips64el:enabled
/proc/sys/fs/binfmt_misc/qemu-riscv64:enabled
/proc/sys/fs/binfmt_misc/jar:enabled
/proc/sys/fs/binfmt_misc/python2.7:enabled
/proc/sys/fs/binfmt_misc/llvm-6.0-runtime.binfmt:enabled
/proc/sys/fs/binfmt_misc/python3.6:enabled
grep: /proc/sys/fs/binfmt_misc/register: Invalid argument
/proc/sys/fs/binfmt_misc/status:enabled
[root@ningan ~]# docker buildx
docker: 'buildx' is not a docker command.
See 'docker --help'
[root@ningan ~]# 


嘗試5:安裝docker-buildx-plugin --> docker buildx 成功

[root@ningan ~]# sudo apt install docker-buildx-plugin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package docker-buildx-plugin
[root@ningan ~]# apt update
Hit:1 https://mirrors.aliyun.com/ubuntu bionic InRelease
Hit:2 https://mirrors.aliyun.com/ubuntu bionic-security InRelease             
Hit:3 https://mirrors.aliyun.com/ubuntu bionic-updates InRelease              
Hit:4 https://mirrors.aliyun.com/ubuntu bionic-backports InRelease              
Reading package lists... Done                                                   
Building dependency tree       
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.

# 添加 Docker 官方 GPG 密鑰:
[root@ningan ~]# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
# 添加 Docker 官方倉庫:
[root@ningan ~]# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Hit:1 https://mirrors.aliyun.com/ubuntu bionic InRelease
Hit:2 https://mirrors.aliyun.com/ubuntu bionic-security InRelease              
Hit:3 https://mirrors.aliyun.com/ubuntu bionic-updates InRelease                
Hit:4 https://mirrors.aliyun.com/ubuntu bionic-backports InRelease              
Get:5 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Get:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [39.0 kB]
Fetched 103 kB in 4s (24.2 kB/s)    
Reading package lists... Done

# 更新軟件源列表并安裝 `docker-buildx-plugin`
[root@ningan ~]# sudo apt update  
Hit:1 https://mirrors.aliyun.com/ubuntu bionic InRelease
Hit:2 https://mirrors.aliyun.com/ubuntu bionic-security InRelease                                                               
Hit:3 https://mirrors.aliyun.com/ubuntu bionic-updates InRelease                                                                 
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease                                                                  
Hit:5 https://mirrors.aliyun.com/ubuntu bionic-backports InRelease        
Reading package lists... Done                      
Building dependency tree       
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
[root@ningan ~]# sudo apt install docker-buildx-plugin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-hwe-5.4-headers-5.4.0-126 linux-hwe-5.4-headers-5.4.0-131 linux-hwe-5.4-headers-5.4.0-132 linux-hwe-5.4-headers-5.4.0-135
  linux-hwe-5.4-headers-5.4.0-136 linux-hwe-5.4-headers-5.4.0-137 linux-hwe-5.4-headers-5.4.0-139 linux-hwe-5.4-headers-5.4.0-144
  linux-hwe-5.4-headers-5.4.0-146 linux-hwe-5.4-headers-5.4.0-147 linux-hwe-5.4-headers-5.4.0-148 pkg-php-tools shtool
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  docker-buildx-plugin
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 26.1 MB of archives.
After this operation, 71.2 MB of additional disk space will be used.
Get:1 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-buildx-plugin amd64 0.10.5-1~ubuntu.18.04~bionic [26.1 MB]
Fetched 26.1 MB in 7s (3,669 kB/s)                                                                                                    
Selecting previously unselected package docker-buildx-plugin.
(Reading database ... 382316 files and directories currently installed.)
Preparing to unpack .../docker-buildx-plugin_0.10.5-1~ubuntu.18.04~bionic_amd64.deb ...
Unpacking docker-buildx-plugin (0.10.5-1~ubuntu.18.04~bionic) ...
Setting up docker-buildx-plugin (0.10.5-1~ubuntu.18.04~bionic) ...
[root@ningan ~]# docker buildx version
github.com/docker/buildx v0.10.5 86bdced

文章來源地址http://www.zghlxwxcb.cn/news/detail-833680.html

到了這里,關(guān)于【docker錯(cuò)誤解決系列】 ‘buildx‘ is not a docker command.的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • git: ‘lfs‘ is not a git command. See ‘git --help‘的解決方案

    git: ‘lfs‘ is not a git command. See ‘git --help‘的解決方案

    ??大家好,我是愛編程的喵喵。雙985碩士畢業(yè),現(xiàn)擔(dān)任全棧工程師一職,熱衷于將數(shù)據(jù)思維應(yīng)用到工作與生活中。從事機(jī)器學(xué)習(xí)以及相關(guān)的前后端開發(fā)工作。曾在阿里云、科大訊飛、CCF等比賽獲得多次Top名次?,F(xiàn)為CSDN博客專家、人工智能領(lǐng)域優(yōu)質(zhì)創(chuàng)作者。喜歡通過博客創(chuàng)作

    2024年02月11日
    瀏覽(16)
  • goland報(bào)錯(cuò):“package command-line-arguments is not a main package”解決方案

    大家好!我是躺平哥。? ? ? ?? 今天模擬客戶端和服務(wù)端交互時(shí)遇到了一個(gè)問題: “package command-line-arguments is not a main package” ?????????翻譯過來就是包命令行參數(shù)不是主包 ? ? ? ? 因?yàn)樵贕o語言中,和java的main是有所區(qū)別的,具體區(qū)別如下: ????????在java中,任何

    2023年04月19日
    瀏覽(24)
  • 解決repo sync ( git )報(bào)錯(cuò): git: ‘remote-https‘ is not a git command

    在Ubuntu 18.04上下載Android源碼,遇到報(bào)錯(cuò):git: ‘remote-https’ is not a git command。 使用apt命令升級(jí)git到最新版本,不能解決這個(gè)問題。 使用GitHub或者國內(nèi)的git服務(wù),用ssh方式的下載代碼是可以的,HTTPS的方式會(huì)報(bào)同樣的錯(cuò)誤。 下載git源碼,在本地編譯: 看網(wǎng)上說需要有l(wèi)ibcurl4-

    2024年02月09日
    瀏覽(15)
  • 出現(xiàn) sudo: docker: command not found 的解決方法

    安裝了docker,但是執(zhí)行docker命令的時(shí)候,提示該問題:

    2024年02月12日
    瀏覽(21)
  • 如何解決docker中出現(xiàn)的“bash: vim: command not found”

    如何解決docker中出現(xiàn)的“bash: vim: command not found”

    目錄 問題描述: 問題解決: 在docker中,想要執(zhí)行vim編輯文件,彈出“docker bash: vim: command not found“(如下圖),請(qǐng)問該如何解決? 解決辦法,主要分成兩個(gè)步驟: 步驟1,執(zhí)行如下命令: 步驟2,繼續(xù)執(zhí)行如下命令: ?再執(zhí)行vim命令,便不會(huì)報(bào)錯(cuò)。

    2024年02月13日
    瀏覽(26)
  • Docker中出現(xiàn)bash: vim: command not found解決方案

    RedHat系列:Redhat、Centos、Fedora等 Debian系列:Debian、Ubuntu等 RedHat系列的包管理工具是 yum Debian系列的包管理工具是 apt-get Debian系列 RedHat系列

    2024年02月07日
    瀏覽(20)
  • 前端date.locale is not a function錯(cuò)誤解決辦法

    前端date.locale is not a function錯(cuò)誤解決辦法

    在使用antd組件DatePicker時(shí),修改數(shù)據(jù)之前做數(shù)據(jù)回顯,但是在數(shù)據(jù)回顯時(shí)總是會(huì)報(bào)一個(gè)錯(cuò)誤:date.locale is not a function。經(jīng)過一步步的排錯(cuò),最終確定是使用antd中DatePicker(日期選擇器)組件的問題,此時(shí)我只在表單中寫了一個(gè)DatePicker組件,并在表單中進(jìn)行了數(shù)據(jù)綁定 查閱了很

    2024年02月11日
    瀏覽(25)
  • docker 錯(cuò)誤 WARNING: IPv4 forwarding is disabled. Networking will not work.

    這個(gè)錯(cuò)誤出現(xiàn)在使用 docker 的服務(wù)器上,當(dāng)你進(jìn)入 docker 容器時(shí),如果出現(xiàn)這樣的 WARNING 提示,則表示服務(wù)器沒有開啟 IPv4 轉(zhuǎn)發(fā),按照本文的方法配置開啟轉(zhuǎn)發(fā)即可。 錯(cuò)誤提示: WARNING: IPv4 forwarding is disabled. Networking will not work. 配置 IPv4 轉(zhuǎn)發(fā)如下示例: 如果有的 docker 容器還是

    2024年02月05日
    瀏覽(18)
  • 出現(xiàn) “‘mysql’ is not recognized as an internal or external command, operable program or batch file解決方法

    在 Windows 系統(tǒng)的 DOS 窗口通過命令行的方式登錄 MySQL,出現(xiàn) “‘mysql’ is not recognized as an internal or external command, operable program or batch file” 的提示 意味著系統(tǒng)無法識(shí)別或找不到 MySQL 的可執(zhí)行文件 。這可能是由于以下幾個(gè)原因?qū)е碌模?MySQL 未正確安裝:確保 MySQL 已正確安裝并

    2024年02月07日
    瀏覽(26)
  • 如何解決 Python 錯(cuò)誤 NameError: name ‘X‘ is not defined

    如何解決 Python 錯(cuò)誤 NameError: name ‘X‘ is not defined

    Python“ NameError: name is not defined ”發(fā)生在我們?cè)噲D訪問一個(gè)未定義的變量或函數(shù)時(shí),或者在它被定義之前。 要解決該錯(cuò)誤,需要確保我們沒有拼錯(cuò)變量名并在聲明后訪問它。 下面是產(chǎn)生上述錯(cuò)誤的示例代碼。 問題是我們拼錯(cuò)了變量名。 請(qǐng)注意,變量、函數(shù)和類的名稱區(qū)分大

    2024年02月01日
    瀏覽(30)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包