From 9b11f95715dea618efcab743e88742b9b508a154 Mon Sep 17 00:00:00 2001 From: xingzhilong Date: Fri, 4 Jan 2019 17:57:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Dockerfile=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=9B=B4=E6=8E=A5=E5=90=AF=E5=8A=A8=EF=BC=8C?= =?UTF-8?q?=E8=80=8C=E6=98=AF=E9=9C=80=E8=A6=81docker=20run=20dockerticket?= =?UTF-8?q?=20=20python=20run.py=20&,=20=E5=AE=9E=E7=8E=B0=E5=9C=A8contain?= =?UTF-8?q?er=E5=90=AF=E5=8A=A8=E6=97=B6=E5=80=99=E5=B0=B1=E8=BF=90?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- README.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17fd237..c041944 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,5 @@ RUN pip install --no-cache-dir -r requirements.txt #EXPOSE 5010 WORKDIR /usr/src/app/ -CMD [ "python", "run.py" ] +#CMD [ "python", "run.py" ] +ENTRYPOINT [ "python", "run.py" ] diff --git a/README.md b/README.md index 931ff36..2d5bab8 100755 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ - 由于新增对时功能,请务必用sudo,sudo,sudo 执行,否则会报权限错误,windows打开ide或者cmd请用管理员身份执行python run.py,不需要加sudo - 如果你的服务器安装了docker,那么就可以docker启动 - 1、docker build -t dockerticket . - - 2、docker run dockerticket python run.py & - - 3、本来是可以直接Dockerfile启动的,不知道为毛启动不了,如果有大佬看到问题所在,欢迎提出 + - 2、~~docker run dockerticket python run.py &~~ + - 3、~~本来是可以直接Dockerfile启动的,不知道为毛启动不了,如果有大佬看到问题所在,欢迎提出~~ + - 4、docker run -d --name 12306-ticket dockerticket - 目录对应说明 - agency - cdn代理