...
代码块 |
---|
apt-get update apt-get remove docker docker-engine docker.io containerd runc apt-getinstallget install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt-get update apt install docker-ce docker-ce-cli containerd.io systemctl start docker systemctl enable docker |
下载omc的镜像包omc.tar,导入为镜像tar,(可以在192.168.1.27/28上自行导出镜像包)。导入为镜像
代码块 |
---|
docker import omc.tar omc:latest |
...
代码块 |
---|
docker exec -it omcd bash |
此时已在容器内部
执行下列命令,运行omcd会重新生成license此时已在容器内部,生成license
代码块 |
---|
rm -rf /omclicense
echo "eth0" > /home/ifcName |
生成license后需要将/home/ifcName删除
代码块 |
---|
rm -rf /home/ifcName |
重启容器即完成部署
代码块 |
---|
docker restart omcd |
...