Skip to content

Lando startup fails #116

@rolandoscott

Description

@rolandoscott

While starting with a fresh website, Lando fails to build the php and nginx services.

> lando start
Let's get this party started! Starting app brgroup...
[+] Running 1/0
 ✔ Container landoproxyhyperion5000gandalfedition_proxy_1  Running                                                                                                                                  0.0s 
[+] Building 0.0s (0/0)                                                                                                                                                                   docker:default
[+] Running 0/0
 ⠋ Service php  Building                                                                                                                                                                            0.0s 
failed to get build context cli: stat /home/<local>/.lando/compose/<website name>/service:cli: no such file or directory
ERROR ==> 
[+] Building 0.0s (0/0)                                                                                                                                                                   docker:default
[+] Running 0/0
 ⠋ Service php    Building                                                                                                                                                                          0.0s 
 ⠋ Service nginx  Building                                                                                                                                                                          0.0s 
failed to get build context cli: stat /home/<local>/.lando/compose/<website name>/service:cli: no such file or directory
ERROR ==> 

This fails because docker compose (via Lando) is trying to resolve service:cli as a build context, but Lando doesn’t support that syntax (as of v3.25.3).

So in the docker-compose.yml something like this:

php:
  build:
    context: .
    dockerfile: lagoon/php.dockerfile
    args:
      CLI_IMAGE: *cli-image
    additional_contexts:
      cli: 'service:cli' # Ensure cli is built first

needs to be like this, in order for Lando to work.

php:
  build:
    context: .
    dockerfile: lagoon/php.dockerfile
    args:
      CLI_IMAGE: *cli-image

I don't know enough on why this change was made and whatever else it affects, to know if reverting matters for pygmy or anything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions