Antoine Aïello
Antoine Aïello

Reputation: 292

Can't build Dockerfile

I’m running docker [Docker 18.06.1-ce, build e68fc7a] on an Ubuntu 18 machine.

Simply carrying out a very simple exercise from docker in order to build a dockerfile : https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

On running the following command

docker build -t helloapp .

I get the following error

error checking context: 'can't stat '/home/aielloine/.docker/helloapp/dockerfiles''.

The docker file:

FROM busybox
COPY /hello
RUN cat /hello

Upvotes: 0

Views: 2090

Answers (1)

Florian Schlag
Florian Schlag

Reputation: 659

You are missing the source, i.e. the file you want to copy inside the iamge, in your COPY command:

FROM busybox
COPY <source> /hello
#      ^
#      |
#  This is missing
RUN cat /hello

Upvotes: 1

Related Questions