Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

585
Views
The Compose file './docker-compose.yml' is invalid because: Unsupported config option

I have the following docker-compose file and getting this error,

The Compose file './docker-compose.yml' is invalid because: Unsupported config option

docker-compose.yml:

version: "3"

services:
  webserver:
    build: 
      context: ./bin/webserver
    container_name: 'png-webserver'
    restart: 'always'
    ports:
      - "81:81"
      - "444:444"
    links: 
      - mysql
    volumes: 
      - /var/www/vhost/dev.ivacy.com:/var/www/html
      - ${PHP_INI-./config/php/php.ini}:/usr/local/etc/php/php.ini
      - ${VHOSTS_DIR-./config/vhosts}:/etc/apache2/sites-enabled
      - ${LOG_DIR-./logs/apache2}:/var/log/apache2
    networks:
      vpcbr:
        ipv4_address: 10.5.0.5

  mysql:
    build: ./bin/mysql
    container_name: 'png-mysql'
    restart: 'always'
    ports:
      - "3306:3306"
    volumes:
      - /var/www/docker-compose-lamp/bin/mysql/db:/docker-entrypoint-initdb.d
      - ${MYSQL_DATA_DIR-./data/mysql}:/var/lib/mysql
      - ${MYSQL_LOG_DIR-./logs/mysql}:/var/log/mysql
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: ivacy_muti_site
      MYSQL_USER: root
      MYSQL_PASSWORD: password
    networks:
      vpcbr:
        ipv4_address: 10.5.0.6
    depends_on:
     - mysql

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: 'png-phpmyadmin'
    links:
      - mysql
    environment:
      PMA_HOST: mysql
      PMA_PORT: 3306
    ports:
      - '8081:81'
    volumes: 
      - /sessions
    networks:
      vpcbr:
        ipv4_address: 10.5.0.7
    depends_on:
     - mysql
     - webserver

  redis:
    container_name: 'png-redis'
    image: redis:latest
    ports:
      - "6379:6379"
    networks:
      vpcbr:
        ipv4_address: 10.5.0.8
  networks:
    vpcbr:
      driver: bridge
      ipam:
       config:
         - subnet: 10.5.0.0/16
           gateway: 10.5.0.1
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You've indented networks into the services block.

over 4 years ago · Santiago Trujillo Report

0

networks should be at version level

version: '3.8'
services:
  web:
    build:
      args:
        version: 0.0.1
      context: .
      dockerfile: Dockerfile
    networks:
      - back-tier
    expose:
      - 8080
    ports:
    - 8080:8080
networks:
  back-tier:
    driver: bridge
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!