Skip to main content
edited title
Link
Rider_BY
  • 1.1k
  • 2
  • 13
  • 31

Docker compose build error

added 1176 characters in body
Source Link
Rider_BY
  • 1.1k
  • 2
  • 13
  • 31

WhenIf I try use command docker-compose builddocker-compose build, I'll get error that looks like this:

ERROR: Validation failed in file './docker-compose.yml', reason(s):
Service 'php' configuration key 'expose' '0' is invalid: should be of
the format 'PORT[/PROTOCOL]'

I use the last version docker and docker-compose.

My docker-compose.yml has the next code:

application:
    build: code
    volumes:
        - ./symfony:/var/www/symfony
        - ./logs/symfony:/var/www/symfony/app/logs
    tty: true
db:
    image: mysql
    ports:
        - 3306:3306
    environment:
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: symfony
        MYSQL_USER: root
        MYSQL_PASSWORD: root
php:
    build: php-fpm
    expose:
        - 9000:9000
    volumes_from:
        - application
    links:
        - db
nginx:
    build: nginx
    ports:
        - 80:80
    links:
        - php
    volumes_from:
        - application
    volumes:
        - ./logs/nginx/:/var/log/nginx
elk:
    image: willdurand/elk
    ports:
        - 81:80
    volumes:
        - ./elk/logstash:/etc/logstash
        - ./elk/logstash/patterns:/opt/logstash/patterns
    volumes_from:
        - application
        - php
        - nginx

I use an ubuntu 14.04 Could you tell me how is fix it?

When I try use command docker-compose build I'll get error like this:

ERROR: Validation failed in file './docker-compose.yml', reason(s):
Service 'php' configuration key 'expose' '0' is invalid: should be of
the format 'PORT[/PROTOCOL]'

I use an ubuntu 14.04 Could you tell me how is fix it?

If I use command docker-compose build, I'll get error that looks like:

ERROR: Validation failed in file './docker-compose.yml', reason(s):
Service 'php' configuration key 'expose' '0' is invalid: should be of
the format 'PORT[/PROTOCOL]'

I use the last version docker and docker-compose.

My docker-compose.yml has the next code:

application:
    build: code
    volumes:
        - ./symfony:/var/www/symfony
        - ./logs/symfony:/var/www/symfony/app/logs
    tty: true
db:
    image: mysql
    ports:
        - 3306:3306
    environment:
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: symfony
        MYSQL_USER: root
        MYSQL_PASSWORD: root
php:
    build: php-fpm
    expose:
        - 9000:9000
    volumes_from:
        - application
    links:
        - db
nginx:
    build: nginx
    ports:
        - 80:80
    links:
        - php
    volumes_from:
        - application
    volumes:
        - ./logs/nginx/:/var/log/nginx
elk:
    image: willdurand/elk
    ports:
        - 81:80
    volumes:
        - ./elk/logstash:/etc/logstash
        - ./elk/logstash/patterns:/opt/logstash/patterns
    volumes_from:
        - application
        - php
        - nginx

I use an ubuntu 14.04 Could you tell me how is fix it?

added 6 characters in body
Source Link
shellter
  • 37.6k
  • 7
  • 87
  • 96

When I try use command docker-compose build I'll get error like this:

ERROR: Validation failed in file './docker-compose.yml', reason(s): Service 'php' configuration key 'expose' '0' is invalid: should be of the format 'PORT[/PROTOCOL]'

ERROR: Validation failed in file './docker-compose.yml', reason(s):
Service 'php' configuration key 'expose' '0' is invalid: should be of
the format 'PORT[/PROTOCOL]'

I use an ubuntu 14.04 Could you tell me how is fix it?

When I try use command docker-compose build I'll get error like this:

ERROR: Validation failed in file './docker-compose.yml', reason(s): Service 'php' configuration key 'expose' '0' is invalid: should be of the format 'PORT[/PROTOCOL]'

I use an ubuntu 14.04 Could you tell me how is fix it?

When I try use command docker-compose build I'll get error like this:

ERROR: Validation failed in file './docker-compose.yml', reason(s):
Service 'php' configuration key 'expose' '0' is invalid: should be of
the format 'PORT[/PROTOCOL]'

I use an ubuntu 14.04 Could you tell me how is fix it?

Source Link
Rider_BY
  • 1.1k
  • 2
  • 13
  • 31
Loading