环境:MAC OS X 10.12.1
准备重新学习 Docker,很久之前装过一个 Docker 以及 boot2docker,由于 Docker 已经很老旧了,并且 boot2docker 已经被废弃了,所以安装最新的 Docker 之前想先把旧的卸载干净。
在 root 用户下,执行 uninstall.sh 脚本,内容如下:
#!/bin/bash
# Uninstall Script
if [ "$(which boot2docker)" == "" ]; then
echo "boot2docker does not exist on your machine!"
exit 1
fi
if [ "${USER}" != "root" ]; then
echo "$0 must be run as root!"
exit 2
fi
echo "Stopping boot2docker processes..."
boot2docker stop && boot2docker delete
echo "Removing boot2docker executable..."
rm -f /usr/local/bin/boot2docker
echo "Removing boot2docker ISO and socket files..."
rm -rf ~/.boot2docker
rm -rf /usr/local/share/boot2docker
echo "Removing boot2docker SSH keys..."
rm -f ~/.ssh/id_boot2docker*
echo "Removing boot2docker OSX files..."
rm -f /private/var/db/receipts/io.boot2docker.*
rm -f /private/var/db/receipts/io.boot2dockeriso.*
echo "Removing Docker executable..."
rm -f /usr/local/bin/docker
echo "All Done!"
参考文献:
1. https://github.com/boot2docker/osx-installer
准备重新学习 Docker,很久之前装过一个 Docker 以及 boot2docker,由于 Docker 已经很老旧了,并且 boot2docker 已经被废弃了,所以安装最新的 Docker 之前想先把旧的卸载干净。
在 root 用户下,执行 uninstall.sh 脚本,内容如下:
#!/bin/bash
# Uninstall Script
if [ "$(which boot2docker)" == "" ]; then
echo "boot2docker does not exist on your machine!"
exit 1
fi
if [ "${USER}" != "root" ]; then
echo "$0 must be run as root!"
exit 2
fi
echo "Stopping boot2docker processes..."
boot2docker stop && boot2docker delete
echo "Removing boot2docker executable..."
rm -f /usr/local/bin/boot2docker
echo "Removing boot2docker ISO and socket files..."
rm -rf ~/.boot2docker
rm -rf /usr/local/share/boot2docker
echo "Removing boot2docker SSH keys..."
rm -f ~/.ssh/id_boot2docker*
echo "Removing boot2docker OSX files..."
rm -f /private/var/db/receipts/io.boot2docker.*
rm -f /private/var/db/receipts/io.boot2dockeriso.*
echo "Removing Docker executable..."
rm -f /usr/local/bin/docker
echo "All Done!"
参考文献:
1. https://github.com/boot2docker/osx-installer
没有评论:
发表评论