Checking what is inside the context sent to the docker daemon and whether the configured .dockerignore
is behaving as expected can be achieved with the following guide.
Create a dockerfile with the name Dockerfile.build-context
FROM busybox
COPY . /build-context
WORKDIR /build-context
CMD find .
Then the created dockerfile can be built and run.
docker build -f Dockerfile.build-context -t build-context .
docker run --rm -it build-context
This will print the content of the build context allowing to analyze the content.