compose.yml
file, which looks like this:
version: \'2\'
services:
discovery-microservice:
build: discovery-microservice
context: /discov
Literally found the solution seconds later. You have to remove the "discovery-microservice" after "build":
version: '2'
services:
discovery-microservice:
build:
context: ./discovery-microservice/target/docker
dockerfile: Dockerfile
ports:
- "8761:8761"
Also you can use "./" in context for relative paths. :)