yingyingShare

端口:

80:web默认端口
443:安全协议
25 :邮件服务
22:ssh服务端口 

查看端口是否被占用:

mac:lsof -i :端口号

windows:netstat -ano | findstr "端口号"

在docker部署nginx镜像

dockrprofile:

FROM nginx
MAINTAINER 无涯Share
RUN echo "Hi, This Is A Docker Continer Website" > /usr/share/nginx/html/index.html
EXPOSE 80

构建:
docker build -t nginx_web -f Dockerfile .

运行镜像:
docker run --rm -p80:80 nginx_web


查看nginx服务的日志信息:

docker logs -f 容器ID

 

 

 

使用docker部署python环境:

Dockerprofile:

FROM centos:7.9.2009

MAINTAINER 无涯

#安装Python环境

RUN yum install python3-devel python3-pip -y

#安装flask库

RUN pip3  install -i https://pypi.douban.com/simple   flask

RUN pip3 install flask_restful

RUN pip3 install flask_httpauth

RUN pip3 install flask_jwt

#复制文件到容器目录

COPY app.py /opt

#切换目录

WORKDIR /opt

#启动服务

EXPOSE 5000

CMD ["python3","app.py"]

 

#构建
docker build -t python_web -f Dockerfile .

 

 

#运行镜像信息
docker run --rm -p5000:5000 python_web

 查看ip地址:

mac:ifconfig/系统偏好设置-网络

 

windows:ipconfig

netstat -ano | findstr "被查询的端口" #根据端口查询到应用程序的pid信息
tasklist | findstr "pid" #根据pid信息查询到具体的应用程序
 

 

 

MQ:生产者消费者模式

MQ:kafka,rabbitmq,activitymq

https://www.rabbitmq.com/

使用Docker来安装RabbitMQ:

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.9-management

 

 

username:guest

password:guest 点击登录

 

分类:

技术点:

相关文章:

  • 2021-12-10
  • 2021-04-27
  • 2022-02-07
  • 2021-09-17
  • 2021-05-23
  • 2021-11-30
  • 2022-02-13
猜你喜欢
  • 2022-12-23
  • 2021-12-05
  • 2021-08-25
  • 2021-12-18
  • 2022-12-23
  • 2022-01-16
相关资源
相似解决方案