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.

Jessica Rodriguez
  • 2,899
  • 1
  • 12
  • 27
gpathak
  • 31
  • 1
  • 2

1 Answers1

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.

Mihai
  • 9,526
  • 2
  • 18
  • 40