You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 拉取portainer
docker pull docker.io/portainer/portainer
# 查看安装情况
[root@Docker ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
portainer/portainer latest 5f11582196a4 21 months ago 287MB
# 启动UI
docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name prtainer-test portainer/portainer
# 查看启动情况
[root@Docker ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
030d79093f91 portainer/portainer "/portainer" 56 seconds ago Up 55 seconds 8000/tcp, 9443/tcp, 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp prtainer-test
# 如果页面提示:
Your Portainer instance timed out for security purposes. To re-enable your Portainer instance, you will need to restart Portainer
则使用如下命令重启
docker restart 030d79093f91
# 访问地址
http://10.10.14.212:9000
# 创建用户
admin
mdcija780522
# 到Docker 官网查询镜像名称
http://hub.docker.com/
# 下载Tomcat8
docker pull tomcat:8.5.49-jdk8-openjdk
# 创建Tomcat8容器
docker run -itd --privileged=true --name=mytomcat -p 8081:8080 -v /usr/local/webapps:/usr/local/tomcat/webapps tomcat:8.5.49-jdk8-openjdk
# 如果报错out of memory
https://blog.csdn.net/weixin_44492434/article/details/137582782
# 删除镜像
docker rmi -f <IMAGE_NAME_OR_ID>
# 删除容器
docker rm -f 4bf2bd13f5b0