airflow-tutorial
airflow-tutorial copied to clipboard
Docker-compose up Error (Failed to build webserver)
Hi, after reading the docs and after running docker-compose up
into my machine, I got this error:
Building webserver
[+] Building 0.0s (1/1) FINISHED
=> CACHED [internal] load git source https://github.com/puckel/docker-airflow.git#1.10.1 0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount261987239/https:/github.com/puckel/docker-airflow.git#1.10.1/Dockerfile: no such file or directory
ERROR: Service 'webserver' failed to build
My configs:
Distributor ID: Mac OS
Description: macOS Big Sur
Release: 11.2.3 (20D91)
Docker version 20.10.5, build 55c4c88
docker-compose version 1.28.5, build c4eb3a1f
Can someone help me ?
I have met the same issue
the last comment fix it for me https://stackoverflow.com/questions/66579446/error-executing-docker-compose-building-webserver-unable-to-prepare-context-un
Also getting this after downloading a fresh docker-compose version. I'm also on Ubuntu 20.04.2 LTS, docker-compose version 1.29.1, build c34c88b2. Downgrading to 1.27.4 "resolve" the error… Isn't it supposed to be statically linked?
I changed 2 tags appearing on image and context by deleting version number. My docker-compose.yml file is below.
- OS: Ubuntu 18.04 Desktop
- Docker version: 20.10.12
- docker-compose version: 1.28.2
version: '3'
services:
postgres:
image: postgres:9.6
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
ports:
- "5432:5432"
webserver:
image: puckel/docker-airflow:latest
build:
context: https://github.com/puckel/docker-airflow.git
dockerfile: Dockerfile
args:
AIRFLOW_DEPS: gcp_api,s3
PYTHON_DEPS: sqlalchemy==1.2.0
restart: always
depends_on:
- postgres
environment:
- LOAD_EX=n
- EXECUTOR=Local
- FERNET_KEY=jsDPRErfv8Z_eVTnGfF8ywd19j4pyqE3NpdUBA_oRTo=
volumes:
- ./examples/intro-example/dags:/usr/local/airflow/dags
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3