阿东的笔记_  工具
## PyCharmCE中使用docker进行开发调试 - 内容 1. [PyCharmCE安装docker插件](#pycharmce-docker-) 2. [Dockerfile](#dockerfile) #### PyCharmCE安装docker插件 1. 【设置】->【插件】->搜索【docker】插件并安装 - [![install](https://static.adong.wiki/static/images/md/2021030701.png)](https://static.adong.wiki/static/images/md/2021030701.png) 2. 在pycharm中运行编写好的python项目【添加配置】->【新添加】 - [![install](https://static.adong.wiki/static/images/md/2021030702.png)](https://static.adong.wiki/static/images/md/2021030702.png) 3. 配置相关参数 - [![install](https://static.adong.wiki/static/images/md/2021030704.png)](https://static.adong.wiki/static/images/md/2021030704.png) 4. 运行 - [![install](https://static.adong.wiki/static/images/md/2021030703.png)](https://static.adong.wiki/static/images/md/2021030703.png) #### Dockerfile ``` Dockerfile FROM python:3.7 COPY requirement.txt /home/ RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo 'Asia/Shanghai' >/etc/timezone && \ pip install -r /home/requirement.txt -i https://pypi.douban.com/simple/ EXPOSE 5000 CMD ["uwsgi","/home/ad/uwsgi.ini"] # docker build -t ad:1.0 ./ ```
adddge@sohu.com  | 桂ICP备2022009838号-2