2

I am running following version of docker ce

Server: Docker Engine - Community Engine: Version: 18.09.5 API version: 1.39 (minimum version 1.12) Go version: go1.10.8 Git commit: e8ff056dbc Built: Thu Apr 11 04:50:00 2019 OS/Arch: linux/amd64 Experimental: false 

Getting following error while building image

Removing intermediate container 40e7e0172f54 ---> 5f2b3358b638 Step 5/10 : COPY files/nginx.conf /etc/nginx/nginx.conf COPY failed: stat /var/lib/docker/tmp/docker-builder076499369/files/nginx.conf: no such file or directory

Re-installing docker. Setting up context.

3
  • 1
    Add Dockerfile pls. Also the folder structure and build command. Commented May 2, 2019 at 11:15
  • I am getting this same error -- I think the Docker client is not sending the build context to the Docker daemon properly, but am not sure why. Commented May 30, 2019 at 18:59
  • Just check, if nginx.conf is not at the same or below hierarchal level than the docker file Commented Dec 5, 2019 at 10:21

1 Answer 1

1

Check that you have the following files structure:

|-- project | |-- Dockerfile | |-- files | | |-- nginx.conf 

Also make sure that next to the Dockerfile you do not have a file ".dockerignore" and if you have one make sure it does not contain an entry for "files" or "nginx.conf".

Then it should work.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.