【发布时间】:2018-10-04 05:48:02
【问题描述】:
我在 Ubuntu 机器上运行 docker [Docker 版本 17.06.2-ce,构建 a04f55b]。
只需从 docker 执行一个非常简单的练习即可构建 docker 映像:https://docs.docker.com/get-started/part2/#apppy
在运行以下命令时
sudo docker build -t friendlyhello .
我收到以下错误
error checking context: 'can't stat '/home/xyz/docker_experiments''.
我知道这与 apparmour 和权限有关。
根据要求,这是 Dockerfile
# Use an official Python runtime as a parent image
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV NAME World
# Run app.py when the container launches
CMD ["python", "app.py"]
【问题讨论】:
-
您能否在问题中包含您正在使用的实际 Dockerfile?
标签: docker dockerfile ubuntu-18.04