Building image in IntelliJ…
Deploying ‘boot-docker-demo Dockerfile: docker/Dockerfile’…
Building image…
Step 1/5 : FROM java:8
—> d23bdf5b1b1b
Step 2/5 : VOLUME /tmp
—> Using cache
—> e093c2ceecef
Step 3/5 : ADD *.jar.jar boot-docker-demo.jar
Error: ResponseItem.ErrorDetail[code=<null>,message=ADD failed: no source files were specified]
Failed to deploy ‘boot-docker-demo Dockerfile: docker/Dockerfile’: ADD failed: no source files were specified
Solution:
The jar path is not specified correctly in Dockfile.
Note the command: COPY is used to copy local files or folders to the mirror path, e.g.
COPY target/*.jar boot-docker-demo.jar
ADD can download content from a URL address to copy to the container, e.g.
ADD last.tar.gz /var/www
Note: You cannot ADD files outside of the build directory or below, e.g. : . /path
So for copying files only, it is recommended to use _COPY
Similar Posts:
- “Docker build” requires exactly 1 argument [How to Solve]
- [Solved] Docker rmi Error: Error response from daemon: conflict: unable to delete 6c20ffa54f86 (must be forced) – image is being used by stopped container 6e81c0d9b6ab
- Failed to get D-Bus connection: Operation not permitted [docker Install centos7]
- “This computer doesn’t have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory”
- Docker OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caus
- docker: Error response from daemon: Conflict. The container name “/xx” is already in use
- [Solved] http: server gave HTTP response to HTTPS client
- Docker ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [How to Solve]
- [How to]docker http: server gave HTTP response to HTTPS client
- Solutions to docker pull error reporting