== wildfly.dockerfile
# Define o autor da imagem
LABEL key="Sergio Valle Junior"
# Monta um volume para que seja possível realizar os deploys das aplicações
VOLUME ["/opt/wildfly/standalone/deployments/"]
# Expoe as porta para fora do container.
EXPOSE 9990
== docker-compose.yml
version: '3.7'
services:
wildfly:
build:
dockerfile: ./wildfly.dockerfile
context: .
image: jboss/wildfly
container_name: wildfly
ports:
- "9990"
networks:
- local
volumes:
- type: volume
source: deploy-wildfly
target: /opt/wildfly/standalone/deployments/
volume:
nocopy: true
networks:
local:
driver: bridge
volumes:
deploy-wildfly:
Ao realizar o comando docker-compose up, recebo o seguinte erro:
Recreating ffeac44473ef_wildfly ... error
ERROR: for ffeac44473ef_wildfly Cannot create container for service wildfly: invalid volume specification: '8578f88b2692d96b650db0b64a20da1973f195bea0675eff9ed29524e90d0a25:wildfly/standalone/deployments:rw': invalid mount config for type "volume": invalid mount path: 'wildfly/standalone/deployments' mount path must be absolute
ERROR: for wildfly Cannot create container for service wildfly: invalid volume specification: '8578f88b2692d96b650db0b64a20da1973f195bea0675eff9ed29524e90d0a25:wildfly/standalone/deployments:rw': invalid mount config for type "volume": invalid mount path: 'wildfly/standalone/deployments' mount path must be absolute
ERROR: Encountered errors while bringing up the project.
Alguém pode me auxiliar?