Amin Ba
Amin Ba

Reputation: 2436

dockerfile COPY does not copy all the files

I do

The create a Dockerfile as below

FROM openjdk

RUN mkdir app

WORKDIR /app

COPY ./ .

ENTRYPOINT ["sleep", "1000000"]

then

I then run docker exec -it CONTAINER_ID bash

pwd returns /app which is expected

but I ls and see that the files are not copied

only the directories and the xml file is copied into the /app directory

enter image description here

What is the reason? how to fix it?

Also I tried

FROM openjdk

RUN mkdir app

WORKDIR /app

COPY . /app

ENTRYPOINT ["sleep", "1000000"]

Upvotes: 4

Views: 2942

Answers (1)

David Maze
David Maze

Reputation: 158908

That repository contains a .dockerignore file which excludes everything except a set of things it selects.

That repository's docker directory also contains several build scripts for official images and you may find it easier to start your custom image FROM openzipkin/zipkin rather than trying to reinvent it.

Upvotes: 6

Related Questions