-
-
Notifications
You must be signed in to change notification settings - Fork 4
Lando doesn't seem to respect build context with Lagoon #7
Description
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 installIt 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 startTell 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
- defaultFirst 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.