Container not connected to the network lando_bridge_network

2.1k Views Asked by At

I'm creating a custom service in Lando for a Drupal 8 project. This is my first time really trying to add a service through the docker compose method and I'm not sure what I'm doing, even after looking at the Lando docs. My .lando.yml file is below. Afte running lando start though, I get error: (HTTP code 500) server error - container <portainer container ID> is not connected to the network lando_bridge_network

name: drupal8
recipe: drupal8

config:
  php: 7.2
  via: apache
  webroot: web
  xdebug: false
  conf:
    php: lando/config/php.ini
    mysql: lando/config/my.cnf

 services:
  database:
    type: mysql:5.7
  pma:
    type: phpmyadmin
    hosts:
      - database
  appserver:
    composer:
      phpunit/phpunit: '*'
      behat/behat: 3.3.1
    run:
      - "ln -s /usr/local/bin/composer /usr/local/bin/composer.phar"
  portainer:
    type: compose
    services:
      image: portainer/portainer
      command: /opt/bin/entry_point.sh -d /data -H tcp://localhost:9001

tooling:
  phpunit:
    service: appserver
    description: run PHPUnit- use lando phpunit
  behat:
    service: appserver
    description: run behat- use lando behat
    cmd: cd /app ; behat  # Run behat from the /app  directory
1

There are 1 best solutions below

2
On

I had this problem when establishing AWS elasticsearch..

try the following in terminal:

docker network connect lando_bridge_network <container ID in error message>

More info: https://docs.docker.com/engine/reference/commandline/network_connect/#description