[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lando doesn't seem to respect build context with Lagoon #7

Open
mglaman opened this issue Feb 13, 2021 · 2 comments
Open

Lando doesn't seem to respect build context with Lagoon #7

mglaman opened this issue Feb 13, 2021 · 2 comments

Comments

@mglaman
Copy link
mglaman commented Feb 13, 2021

Tell us about your setup

v3.0.23 macOS Big Sur

Tell us about your .lando.yml
Lagoon recipe.

name: contribkanban
recipe: lagoon
config:
  build:
    - composer install

It is also helpful to include other relevant config files. For example, include pantheon.yml for a pantheon recipe if applicable. Include php.ini or mysql.cnf if you are overriding our defualt config.

Tell us about the command you were running

Paste in a series of commands that caused the bug.

Example:

lando start

Tell us about the error you got

My Dockerfile commands are failing even though they build fine in Lagoon. Mostly file paths, meaning it's ignoring the build context and always using the root dir.

Example:

Done in 48.09s.
Removing intermediate container edccc5e5cc65
 ---> 8b152999e911

Step 12/16 : FROM amazeeio/nginx
 ---> 4b6ea22e6751
Step 13/16 : COPY --from=builder /app/build /app
ERROR: Service 'frontend' failed to build : COPY failed: stat app/build: file does not exist
ERROR ==>  message=, stack=Error
    at /snapshot/lando/build/cli/lib/shell.js
From previous event:

Tell us generally about your bug

ContribKanban is a mono repo with a frontend React app. The frontend app is in frontend. This is my docker-compose.yml

services:
  frontend:
    build:
      context: frontend
      dockerfile: ../lagoon/Dockerfile.app
    labels:
      # Lagoon Labels
      lagoon.type: nginx
      lando.type: nginx
    environment:
      <<: *default-environment
      LAGOON_LOCALDEV_URL: contribkanban-app.docker.amazee.io
      REACT_APP_API_HOSTNAME: http://drupal-varnish.contribkanban-app.docker.amazee.io/
    networks:
      - amazeeio-network
      - default

First it died on ../lagoon/Dockerfile.app and I thought it was a fluke. I changed that and it kept dying. This is because the context of context: frontend is not respected. Lando is always using the root dir as context.

@mglaman
Copy link
Author
mglaman commented Feb 13, 2021

Workaround: remove lando.type so the frontend is ignored. I can run it locally via yarn start.

@stale
Copy link
stale bot commented Aug 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

@rtfm-47 rtfm-47 transferred this issue from lando/lando Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants