1.部署:
加载镜像文件:
docker load < android-battery-historia.tar
启动镜像,映射端口9999-999
docker run -d -p 9999:9999 gcr.io/android-battery-historian/stable:3.0
2.测试过程:
重启虚拟机后,在secureCRT切换root用户,启动docker:
(base) vm@ubuntu:~$ sudo -i
[sudo] password for vm:
root@ubuntu:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
root@ubuntu:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
979816d8b1b2 gcr.io/android-battery-historian/stable:3.0 "battery-historian" 10 days ago Exited (255) 5 seconds ago 0.0.0.0:9999->9999/tcp cool_saha
root@ubuntu:~# docker start 979816d8b1b2
373816d8b2b1
备注:需要用到代理