国内服务器
亚洲服务器
欧洲服务器
北美洲服务器
南美洲服务器
大洋洲服务器
非洲服务器

首页>>IDC资讯

彻底卸载docker的方法

发表时间:2022-05-31 09:01:25

页:1胡志明?胡志明?胡志明码头工阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,你是说.-你好-你好,范仲淹是范仲淹还是范仲淹!

魏冄页:1嘿嘿:

你好:

是云娥100%的云娥,是吗大陆(大陆)你好-你好,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,嗨,阿曼苏丹国码头工阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云阿云(阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金阿金|存储驱动程序:叠加2)。

1781年:

S7-1200可编程控制器你好啊

yumkremovedocker

码头工人客户端

dock客户端-最新

坞站-通用

dock-最新

dock-latest-log rotate

dock-log rotate

dock-selinux

停靠引擎selinux

坞站引擎

RM-RF/etc/系统/系统/坞站。服务。d

远程监控-射频/无功/lib/坞站

RM-RF/var/run/dock是吗

#!/bin/sh

set-e(设置-e)

#此脚本是通过3330实现的

# curl-fsslget。码头工人。com-oget docker。嘘

#$shget坞站。嘘

#

#fortestbuilds(重新申请人)3330

# $ curl-fssltest。码头工人。最大的码头工人。嘘

#$shtest坞站。嘘

#

# note : makereetoveritycontentsoftshescript

# youdownloadmatchstcontentsowsinstall。嘘

#定位dat https://github。com/docker/docker-安装

#执行前.

#

# gitcommitfrom 339 github。com/docker/docker-安装时间

# the script wauploaded(sholdonlybemodifiedbuploadjob)3330

SCRIPT_COMMIT_SHA=36b78b2

# 3330的此值将自动调整

# *边缘

# *测试

# *实验性

DEFAULT_CHANNEL_VALUE='edge '

if[-z $ channel]]:然后呢

通道=$DEFAULT_CHANNEL_VALUE

菲儿

default _ download _ URL=' 339下载。码头工人。' com '

if[-z " $ download _ URL "]:然后呢

下载_ URL=$ default _ download _ URL

菲儿

default _ repo _ file=' docker-ce。回购

if[-z " $ repo _ file "]:然后呢

回购_文件=' $ DEFAULT _回购_文件'

菲儿

' SUPPORT_MAP='

x86_64美分-7

x86_64-fedora-26高速公路(义大利)

x86_64-fedora-27高速公路(义大利)

x86_64-fedora-28高速公路(义大利)

-伊甸园字幕组=-翻译

-伊甸园字幕组=-翻译

x86_64-debian拉伸

x86 _ 64 debian总线

x86 _ 64 Ubuntu信任

x86 _ 64 Ubuntu异种版

x86 _ 64 Ubuntu仿生版

x86 _ 64 Ubuntu软体

s390 x Ubuntu异种

s390 x Ubuntu仿生版

s390 x Ubuntu软体

PPC 64 le Ubuntu异种版

PPC 64 le Ubuntu仿生版

PPC 64 le-Ubuntu-巧

aach 74 Ubuntu异种版

aarch 74乌邦图仿生学

aach 74-debian-jes

aach 74-debian拉伸

aach 74-debian巴斯特

aach 74-fedora-26战斗机

aach 74-fedora-27战斗机

aach 74-fedora-28战斗机

aarch 74分七秒

armv6l-raspbian-jessie armv7l-raspbian-jessie armv6l-raspbian-stretch armv7l-raspbian-stretch armv7l-debian-jessie armv7l-debian-stretch armv7l-debian-buster armv7l-ubuntu-trusty armv7l-ubuntu-xenial armv7l-ubuntu-bionic armv7l-ubuntu-artful " mirror='' DRY_RUN=${DRY_RUN:-} while[$#-gt0];do case"$1"in --mirror) mirror="$2" shift ;; --dry-run) DRY_RUN=1 ;; --*) echo"Illegaloption$1" ;; esac shift$(($#>0?1:0)) done case"$mirror"in Aliyun) DOWNLOAD_URL="https://mirrors.aliyun.com/docker-ce" ;; AzureChinaCloud) DOWNLOAD_URL="https://mirror.azure.cn/docker-ce" ;; esac command_exists(){ command-v"$@">/dev/null2>&1 } is_dry_run(){ if[-z"$DRY_RUN"];then return1 else return0 fi } deprecation_notice(){ distro=$1 date=$2 echo echo"DEPRECATIONWARNING:" echo"Thedistribution,$distro,willnolongerbesupportedinthisscriptasof$date." echo"Ifyoufeelthisisamistakepleasesubmitanissueathttps://github.com/docker/docker-install/issues/new" echo sleep10 } get_distribution(){ lsb_dist="" #Everysystemthatweofficiallysupporthas/etc/os-release if[-r/etc/os-release];then lsb_dist="$(./etc/os-release&&echo"$ID")" fi #Returninganemptystringhereshouldbealrightsincethe #casestatementsdon'tactunlessyouprovideanactualvalue echo"$lsb_dist" } add_debian_backport_repo(){ debian_version="$1" backports="debhttp://ftp.debian.org/debian$debian_version-backportsmain" if!grep-Fxq"$backports"/etc/apt/sources.list;then (set-x;$sh_c"echo"$backports">>/etc/apt/sources.list") fi } echo_docker_as_nonroot(){ ifis_dry_run;then return fi ifcommand_existsdocker&&[-e/var/run/docker.sock];then ( set-x $sh_c'dockerversion' )||true fi your_user=your-user ["$user"!='root']&&your_user="$user" #intentionallymixedspacesandtabshere--tabsarestrippedby"<<-EOF",spacesarekeptintheoutput echo"IfyouwouldliketouseDockerasanon-rootuser,youshouldnowconsider" echo"addingyourusertothe"docker"groupwithsomethinglike:" echo echo"sudousermod-aGdocker$your_user" echo echo"Rememberthatyouwillhavetologoutandbackinforthistotakeeffect!" echo echo"WARNING:Addingausertothe"docker"groupwillgranttheabilitytorun" echo"containerswhichcanbeusedtoobtainrootprivilegesonthe" echo"dockerhost." echo"Refertohttps://docs.docker.com/engine/security/security/#docker-daemon-attack-surface" echo"formoreinformation." } #CheckifthisisaforkedLinuxdistro check_forked(){ #Checkforlsb_releasecommandexistence,itusuallyexistsinforkeddistros ifcommand_existslsb_release;then #Checkifthe`-u`optionissupported set+e lsb_release-a-u>/dev/null2>&1 lsb_release_exit_code=$? set-e #Checkifthecommandhasexitedsuccessfully,itmeanswe'reinaforkeddistro if["$lsb_release_exit_code"="0"];then #Printinfoaboutcurrentdistro cat<<-EOF You'reusing'$lsb_dist'version'$dist_version'. EOF #Gettheupstreamreleaseinfo lsb_dist=$(lsb_release-a-u2>&1|tr'[:upper:]''[:lower:]'|grep-E'id'|cut-d':'-f2|tr-d'[:space:]') dist_version=$(lsb_release-a-u2>&1|tr'[:upper:]''[:lower:]'|grep-E'codename'|cut-d':'-f2|tr-d'[:space:]') #Printinfoaboutupstreamdistro cat<<-EOF Upstreamreleaseis'$lsb_dist'version'$dist_version'. EOF else if[-r/etc/debian_version]&&["$lsb_dist"!="ubuntu"]&&["$lsb_dist"!="raspbian"];then if["$lsb_dist"="osmc"];then #OSMCrunsRaspbian lsb_dist=raspbian else #We'reDebiananddon'tevenknowit! lsb_dist=debian fi dist_version="$(sed's//.*//'/etc/debian_version|sed's/..*//')" case"$dist_version"in 9) dist_version="stretch" ;; 8|'KaliLinux2') dist_version="jessie" ;; 7) dist_version="wheezy" ;; esac fi fi fi } semverParse(){ major="${1%%.*}" minor="${1#$major.}" minor="${minor%%.*}" patch="${1#$major.$minor.}" patch="${patch%%[-.]*}" } ee_notice(){ echo echo echo"WARNING:$1isnowonlysupportedbyDockerEE" echo"Checkhttps://store.docker.comforinformationonDockerEE" echo echo } do_install(){ echo"#Executingdockerinstallscript,commit:$SCRIPT_COMMIT_SHA" ifcommand_existsdocker;then docker_version="$(docker-v|cut-d''-f3|cut-d','-f1)" MAJOR_W=1 MINOR_W=10 semverParse"$docker_version" shouldWarn=0 if["$major"-lt"$MAJOR_W"];then shouldWarn=1 fi if["$major"-le"$MAJOR_W"]&&["$minor"-lt"$MINOR_W"];then shouldWarn=1 fi cat>&2<<-'EOF' Warning:the"docker"commandappearstoalreadyexistonthissystem. IfyoualreadyhaveDockerinstalled,thisscriptcancausetrouble,whichis whywe'redisplayingthiswarningandprovidetheopportunitytocancelthe installation. IfyouinstalledthecurrentDockerpackageusingthisscriptandareusingit EOF if[$shouldWarn-eq1];then cat>&2<<-'EOF' againtoupdateDocker,weurgeyoutomigrateyourimagestorebeforeupgrading tov1.10+. Youcanfindinstructionsforthishere: https://github.com/docker/docker/wiki/Engine-v1.10.0-content-addressability-migration EOF else cat>&2<<-'EOF' againtoupdateDocker,youcansafelyignorethismessage. EOF fi cat>&2<<-'EOF' YoumaypressCtrl+Cnowtoabortthisscript. EOF (set-x;sleep20) fi user="$(id-un2>/dev/null||true)" sh_c='sh-c' if["$user"!='root'];then ifcommand_existssudo;then sh_c='sudo-Esh-c' elifcommand_existssu;then sh_c='su-c' else cat>&2<<-'EOF' Error:thisinstallerneedstheabilitytoruncommandsasroot. Weareunabletofindeither"sudo"or"su"availabletomakethishappen. EOF exit1 fi fi ifis_dry_run;then sh_c="echo" fi #performsomeveryrudimentaryplatformdetection lsb_dist=$(get_distribution) lsb_dist="$(echo"$lsb_dist"|tr'[:upper:]''[:lower:]')" case"$lsb_dist"in ubuntu) ifcommand_existslsb_release;then dist_version="$(lsb_release--codename|cut-f2)" fi if[-z"$dist_version"]&&[-r/etc/lsb-release];then dist_version="$(./etc/lsb-release&&echo"$DISTRIB_CODENAME")" fi ;; debian|raspbian) dist_version="$(sed's//.*//'/etc/debian_version|sed's/..*//')" case"$dist_version"in 9) dist_version="stretch" ;; 8) dist_version="jessie" ;; 7) dist_version="wheezy" ;; esac ;; centos) if[-z"$dist_version"]&&[-r/etc/os-release];then dist_version="$(./etc/os-release&&echo"$VERSION_ID")" fi ;; rhel|ol|sles) ee_notice"$lsb_dist" exit1 ;; *) ifcommand_existslsb_release;then dist_version="$(lsb_release--release|cut-f2)" fi if[-z"$dist_version"]&&[-r/etc/os-release];then dist_version="$(./etc/os-release&&echo"$VERSION_ID")" fi ;; esac #CheckifthisisaforkedLinuxdistro check_forked #Checkifweactuallysupportthisconfiguration if!echo"$SUPPORT_MAP"|grep"$(uname-m)-$lsb_dist-$dist_version">/dev/null;then cat>&2<<-'EOF' Eitheryourplatformisnoteasilydetectableorisnotsupportedbythis installerscript. PleasevisitthefollowingURLformoredetailedinstallationinstructions: https://docs.docker.com/engine/installation/ EOF exit1 fi #Runsetupforeachdistroaccordingly case"$lsb_dist"in ubuntu|debian|raspbian) pre_reqs="apt-transport-httpsca-certificatescurl" if["$lsb_dist"="debian"];then if["$dist_version"="wheezy"];then add_debian_backport_repo"$dist_version" fi #libseccomp2doesnotexistfordebianjessiemainreposforaarch74 if["$(uname-m)"="aarch74"]&&["$dist_version"="jessie"];then add_debian_backport_repo"$dist_version" fi fi #TODO:August31,2018deletefromhere, if["$lsb_dist"="ubuntu"]&&["$dist_version"="artful"];then deprecation_notice"$lsb_dist$dist_version""August31,2018" fi #TODO:August31,2018deletetohere, if!command-vgpg>/dev/null;then pre_reqs="$pre_reqsgnupg" fi apt_repo="deb[arch=$(dpkg--print-architecture)]$DOWNLOAD_URL/linux/$lsb_dist$dist_version$CHANNEL" ( if!is_dry_run;then set-x fi $sh_c'apt-getupdate-qq>/dev/null' $sh_c"apt-getinstall-y-qq$pre_reqs>/dev/null" $sh_c"curl-fsSL"$DOWNLOAD_URL/linux/$lsb_dist/gpg"|apt-keyadd-qq->/dev/null" $sh_c"echo"$apt_repo">/etc/apt/sources.list.d/docker.list" if["$lsb_dist"="debian"]&&["$dist_version"="wheezy"];then $sh_c'sed-i"/deb-src.*download.docker/d"/etc/apt/sources.list.d/docker.list' fi $sh_c'apt-getupdate-qq>/dev/null' ) pkg_version="" if[!-z"$VERSION"];then ifis_dry_run;then echo"#WARNING:VERSIONpinningisnotsupportedinDRY_RUN" else #WillworkforincompleteversionsIE(17.12),butmaynotactuallygrabthe"latest"ifinthetestchannel pkg_pattern="$(echo"$VERSION"|sed"s/-ce-/~ce~.*/g"|sed"s/-/.*/g").*-0~$lsb_dist" search_command="apt-cachemadison'docker-ce'|grep'$pkg_pattern'|head-1|cut-d''-f4" pkg_version="$($sh_c"$search_command")" echo"INFO:SearchingrepositoryforVERSION'$VERSION'" echo"INFO:$search_command" if[-z"$pkg_version"];then echo echo"ERROR:'$VERSION'notfoundamongstapt-cachemadisonresults" echo exit1 fi pkg_version="=$pkg_version" fi fi ( if!is_dry_run;then set-x fi $sh_c"apt-getinstall-y-qq--no-install-recommendsdocker-ce$pkg_version>/dev/null" ) echo_docker_as_nonroot exit0 ;; centos|fedora) yum_repo="$DOWNLOAD_URL/linux/$lsb_dist/$REPO_FILE" if!curl-Ifs"$yum_repo">/dev/null;then echo"Error:Unabletocurlrepositoryfile$yum_repo,isitvalid?" exit1 fi if["$lsb_dist"="fedora"];then if["$dist_version"-lt"26"];then echo"Error:OnlyFedora>=26aresupported" exit1 fi pkg_manager="dnf" config_manager="dnfconfig-manager" enable_channel_flag="--set-enabled" pre_reqs="dnf-plugins-core" pkg_suffix="fc$dist_version" else pkg_manager="yum" config_manager="yum-config-manager" enable_channel_flag="--enable" pre_reqs="yum-utils" pkg_suffix="el" fi ( if!is_dry_run;then set-x fi $sh_c"$pkg_managerinstall-y-q$pre_reqs" $sh_c"$config_manager--add-repo$yum_repo" if["$CHANNEL"!="stable"];then $sh_c"$config_manager$enable_channel_flagdocker-ce-$CHANNEL" fi $sh_c"$pkg_managermakecache" ) pkg_version="" if[!-z"$VERSION"];then ifis_dry_run;then echo"#WARNING:VERSIONpinningisnotsupportedinDRY_RUN" else pkg_pattern="$(echo"$VERSION"|sed"s/-ce-/\\.ce.*/g"|sed"s/-/.*/g").*$pkg_suffix" search_command="$pkg_managerlist--showduplicates'docker-ce'|grep'$pkg_pattern'|tail-1|awk'{print$2}'" pkg_version="$($sh_c"$search_command")" echo"INFO:SearchingrepositoryforVERSION'$VERSION'" echo"INFO:$search_command" if[-z"$pkg_version"];then echo echo"ERROR:'$VERSION'notfoundamongst$pkg_managerlistresults" echo exit1 fi #Cutouttheepochandprefixwitha'-' pkg_version="-$(echo"$pkg_version"|cut-d':'-f2)" fi fi ( if!is_dry_run;then set-x fi $sh_c"$pkg_managerinstall-y-qdocker-ce$pkg_version" ) echo_docker_as_nonroot exit0 ;; esac exit1 } #wrappedupinafunctionsothatwehavesomeprotectionagainstonlygetting #halfthefileduring"curl|sh" do_install
chmod+xgetdocker.sh
./getdocker.sh-sdocker--mirrorAliyun

getdocker.sh 文件内容在上个代码区域

以上是“彻底卸载docker的方法”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!


上一篇 下一篇
最新文章

如何提高云服务器的安全系数

香港独立IP空间有什么优势

香港空间影响百度收录吗

为啥要租用美国VPS

VPS的缺点有哪些

香港vps作用在哪里

VPS的优点有哪些

外贸网站为啥选择美国vps

VPS能建多少个网站

VPS要如何选择位置

相关文章

香港云主机租用价格受哪些方面影响

香港高防服务器和高防CDN的差异是什么

秘鲁服务器租用收费价格都与哪些方面有关?

服务器宕机的有哪些缘由

从ROI角度看香港服务器的投资价值

连接香港服务器的优势及使用指南

香港服务器合适哪些行业租用的

外服游戏速度慢?游戏连不上?你需要服务器来

香港服务器价格配置一览表

虚拟主机账号:不要钱虚拟主机申请的流程是什么

X

截屏,微信识别二维码

微信号:muhuanidc

(点击微信号复制,添加好友)

打开微信

微信号已复制,请打开微信添加咨询详情!