【发布时间】:2020-04-18 23:44:41
【问题描述】:
我使用以下命令构建了一个 docker 镜像
docker build -t shantanuo/mydash .
dockerfile 是:
FROM continuumio/miniconda3
EXPOSE 8050
RUN cd /tmp/
RUN apt-get update
RUN apt-get install --yes git zip vim
RUN git clone https://github.com/kanishkan91/SuperTrendfor50Stocks.git
RUN pip install -r SuperTrendfor50Stocks/requirements.txt
WORKDIR SuperTrendfor50Stocks/
我可以启动容器,修改应用程序文件,然后启动应用程序。
第 1 步:
docker run -p 8050:8050 -it shantanuo/mydash bash
第 2 步:
vi application.py
修改最后一行
application.run_server(debug=True)
application.run(host='0.0.0.0')
第 3 步:
python application.py
我可以避免这 3 个步骤并将所有内容合并到我的 dockerfile 中吗?
【问题讨论】:
标签: awk sed dockerfile