I have a Dockerfile
which I want to be built and pushed after jenkins maven build. I have these lines in my Dockerfile
:
...
ARG MAIN_DIR
ADD $MAIN_DIR .
...
And I pass MAIN_DIR
argument as follows:
docker build -t my.gitlab.com:4567/path/to/my/project/my-image-name:my-image-tag --build-arg MAIN_DIR=Development .
But I get:
ADD failed: stat /var/lib/docker/tmp/docker-builder832988213/Development: no such file or directory
EDIT 1:
COPY $MAIN_DIR .
generates the same issue.
EDIT 2:
Current directory actually contains a directory named Development
and I'm completely sure there is no .dockerignore
file in the whole project.