1
$ docker-compose up
ERROR: yaml.parser.ParserError: while parsing a block mapping
in ".\docker-compose.yml", line 3, column 4
expected <block end>, but found '<block mapping start>'
in ".\docker-compose.yml", line 6, column 5
It seems that there is a problem in my yml file. I read some other questions here, and tried several schemes and still can’t make it work.
I wonder where you’re wrong?
version: '3'
services:
kwan:
image: postgres:11.5
network_mode: bridge
container_name: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
expose:
- 5432
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=root
- POSTGRES_USER=postgres
- POSTGRES_DB=root
restart: unless-stopped
backend:
build: .
See how you find yourself;
This is my Dockerfile file;
FROM 8u131-jdk-alpine
MAINTAINER Wladimir Bandeira "[email protected]"
EXPOSE 8080
WORKDIR /usr/local/bin/
COPY dockerTest-1.0.0-SNAPSHOT.jar webapp.jar
CMD ["java","-Dspring.profiles.active=docker-demo","-jar","webapp.jar"]
thank you very much, it worked.
– wladyband