Thank you for your help.
Please let me know if anyone has any knowledge of the following issues.
docker-compose build
encountered a syntax error in docker-compose.yml
.
I'm checking the indentation, but I don't know.
$docker-compose build
ERROR:yaml.scanner.ScannerError: while scanning a simple key
in "./docker-compose.yml", line16, column1
could not find expected':'
in "./docker-compose.yml", line 17, column 5
version: '3'
services:
app:
build:
context:.
dockerfile:./docker/rails/Dockerfile
command —bundle exec unicorn_rails-c/coffee_app/config/unicorn.conf.rb
# command: bundle exec rails -p 3000-b '0.0.0.0'
ports:
- '3000:3000'
volumes:
- tmp_data: /coffee_app/tmp/sockets
- .:/coffee_app
depend_on:
- db
db:
build:
context:.
dockerfile:./docker/mysql/Dockerfile
command:--default-authentication-plugin=mysql_native_password
ports:
- '3306:3306'
volumes:
- db_data: /var/lib/mysql
nginx:
build:
context:.
dockerfile:./docker/nginx/Dockerfile
ports:
- '80:80'
volumes:
- tmp_data: /var/tmp/
volumes:
db_data:
tmp_data:
ruby 2.5.1
rails 5.1.6
docker version 19.03.6
docker-compose version 1.24.0
Resolved.
I copied the code on the rack, so it seems that there were characters in the blanks on lines 16 and 34. (Is it the specification of the rack?)
I deleted the line once and broke it again, and it was fixed.
© 2024 OneMinuteCode. All rights reserved.