我用这个抓头已经有一段时间了。对于我的python应用程序,我有以下Dockerfile:
# Use an official Python runtime as a parent image
FROM frankwolf/rpi-python3
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
RUN chmod 777 docker-entrypoint.sh
# Install an
我正在尝试配置一个Docker映像,这样用户就可以输入"docker“,并有一个窗口弹出来选择输入文件。我尝试在创建Docker映像时使用Tkinter,但是Python脚本在试图加载Tkinter时出错。
由于Tkinter没有工作,所以我尝试切换到一个正常的输入查询,使用:
path= input('Input the file path:\n')
但是现在我得到了一个"EOFError: EOF在读取一行时“,当它到达输入()行时。
我的Dockerfile如下
FROM python:3
ADD script.py /
RUN pip install x
我有以下Dockerfile
FROM python:3.6
MAINTAINER "Alexey Nikitin"
RUN pip install --upgrade pip
RUN pip install tensorflow
RUN pip install numpy pandas
RUN pip install keras --no-deps
RUN ["mkdir", "/tmp/data"]
RUN ["mkdir", "/var/log/result"]
RUN ["mkdir"
我有一些tar文件,我想要移动到docker image,并在那里提取它们,然后运行python web应用程序脚本。我有sh脚本来解压这些文件。
如果我使用run命令运行脚本,那么它们会被提取出来,但它们不会出现在最终的容器中。
我也使用了入口点,但它会执行然后关闭容器,而不是执行"main python script“。
有没有办法执行这个安装脚本,然后继续运行主脚本而不关闭?
Dockerfile
# Use an official Python runtime as a parent image
FROM python:2.7-slim
RUN apt-get update