Tried to simply dockerize my mongodb and spring boot application. Had a lot of struggles and thought I almost had it running and than the terminal hits me with this error:
Building user
[+] Building 0.0s (1/2)
=> ERROR [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 121B 0.0s
------
> [internal] load build definition from Dockerfile:
------
failed to solve with frontend dockerfile.v0: failed to read dockerfile: error from sender: walk \\?\C:\Users\ZRC\Documents\GitHub\s6-kwetter-backend\user\Dockerfile: The system cannot
find the path specified.
ERROR: Service 'user' failed to build : Build failed
Dockerfile (which is in a sub-directory; user-module):
FROM openjdk:11
EXPOSE 8081
ADD target/user-module-docker.jar user-docker.jar
CMD ["java", "-jar", "user-docker.jar"]
docker-compose.yml (which is in the main directory that has multiple modules/microservices):
version: '3.8'
services:
user:
build: ./user/Dockerfile
restart: unless-stopped
container_name: user-ms
ports:
- 8081:8080
mongodb:
image: mongo
restart: always
container_name: mongodb
ports:
- 27017:27017
Like it says that the path specified cannot be found but it literally exists, so where could I have gone wrong?