Bowrna opened a new issue #21454: URL: https://github.com/apache/airflow/issues/21454
### Apache Airflow version main (development) ### What happened I tried to execute the `./breeze build-image --dry-run-docker` ``` Good version of docker 20.10.10. Dry run mode Build image docker buildx build --builder default --progress=tty --pull --build-arg PYTHON_BASE_IMAGE=python:3.7-slim-buster --build-arg AIRFLOW_VERSION=2.3.0.dev0 --build-arg AIRFLOW_BRANCH=main --build-arg AIRFLOW_EXTRAS=devel_ci --build-arg AIRFLOW_PRE_CACHED_PIP_PACKAGES=true --build-arg ADDITIONAL_AIRFLOW_EXTRAS= --build-arg ADDITIONAL_PYTHON_DEPS= --build-arg ADDITIONAL_DEV_APT_COMMAND= --build-arg ADDITIONAL_DEV_APT_DEPS= --build-arg ADDITIONAL_DEV_APT_ENV= --build-arg ADDITIONAL_RUNTIME_APT_COMMAND= --build-arg ADDITIONAL_RUNTIME_APT_DEPS= --build-arg ADDITIONAL_RUNTIME_APT_ENV= --build-arg UPGRADE_TO_NEWER_DEPENDENCIES=false --build-arg CONSTRAINTS_GITHUB_REPOSITORY=apache/airflow --build-arg AIRFLOW_CONSTRAINTS_REFERENCE=constraints-main --build-arg AIRFLOW_CONSTRAINTS=constraints-source-providers --build-arg AIRFLOW_IMAGE_REPOSITORY=https://github.com/apache/airflow --build-arg AIRFLOW_IMAGE_DATE_CREATED=2022-02-09T09:24:11Z --build-arg BUILD_ID=0 --build-arg COMMIT_SHA=ebf76087147 0446fb5e0cd58edf8fec32547e65e --cache-from=ghcr.io/apache/airflow/main/ci/python3.7:cache -t ghcr.io/apache/airflow/main/ci/python3.7 --target main . -f Dockerfile.ci CI image. Branch name: main Docker image: ghcr.io/apache/airflow/main/ci/python3.7 Airflow source version: 2.3.0.dev0 Python version: 3.7 Backend: sqlite ``` I tried to execute the docker command alone by extracting it out. But it failed to execute in the cache apt-get command while the breeze command worked properly ``` [+] Building 26.8s (8/38) => [internal] load build definition from Dockerfile.ci 0.0s => => transferring dockerfile: 36B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 35B 0.0s => [internal] load metadata for docker.io/library/python:3.7-slim-buster 1.5s => importing cache manifest from ghcr.io/apache/airflow/main/ci/python3.7:cache 1.6s => [internal] load build context 0.6s => => transferring context: 417.24kB 0.6s => [ 1/33] FROM docker.io/library/python:3.7-slim-buster@sha256:66fbe736b614879d760c5569a775f2d8e6c3d60f9f33c6d39b1048a54f2d4cc0 0.0s => CACHED [ 2/33] RUN echo "Base image version: python:3.7-slim-buster" 0.0s => ERROR [ 3/33] RUN apt-get update && apt-get install --no-install-recommends -yqq apt-utils >/dev/null 2>&1 && apt-get install -y --no-install-recommends curl gnupg2 && mkdir -pv /u 23.6s ------ > [ 3/33] RUN apt-get update && apt-get install --no-install-recommends -yqq apt-utils >/dev/null 2>&1 && apt-get install -y --no-install-recommends curl gnupg2 && mkdir -pv /usr/share/man/man1 && mkdir -pv /usr/share/man/man7 && export && bash -o pipefail -o errexit -o nounset -o nolog -c " curl --silent --fail --location https://deb.nodesource.com/setup_14.x | bash - && curl --silent --fail https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - >/dev/null 2>&1 && echo 'deb https://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list" && bash -o pipefail -o errexit -o nounset -o nolog -c "" && apt-get update && apt-get install -y --no-install-recommends apt-utils build-essential dirmngr dumb-init freetds-bin freetds-dev git graphviz gosu libffi-dev libldap2-dev libkrb5-dev libpq-dev libsasl2-2 libsasl2-dev libsasl2-modules libssl-dev libenchant-dev locales netcat nodejs rsync sasl2-bin sudo unixodbc unixodbc-dev yarn && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/*: #7 0.603 Get:1 http://deb.debian.org/debian buster InRelease [122 kB] #7 0.740 Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB] #7 0.878 Get:3 http://security.debian.org/debian-security buster/updates/main arm64 Packages [308 kB] #7 0.992 Get:4 http://deb.debian.org/debian buster-updates InRelease [51.9 kB] #7 1.031 Get:5 http://deb.debian.org/debian buster/main arm64 Packages [7735 kB] #7 2.133 Get:6 http://deb.debian.org/debian buster-updates/main arm64 Packages [8784 B] ``` ### What you expected to happen I expected the docker command to run successfully like breeze build-image command ### How to reproduce By executing the below docker command in AIRFLOW_HOME dir ``` docker buildx build --builder default --progress=tty --pull --build-arg PYTHON_BASE_IMAGE=python:3.7-slim-buster --build-arg AIRFLOW_VERSION=2.3.0.dev0 --build-arg AIRFLOW_BRANCH=main --build-arg AIRFLOW_EXTRAS=devel_ci --build-arg AIRFLOW_PRE_CACHED_PIP_PACKAGES=true --build-arg ADDITIONAL_AIRFLOW_EXTRAS= --build-arg ADDITIONAL_PYTHON_DEPS= --build-arg ADDITIONAL_DEV_APT_COMMAND= --build-arg ADDITIONAL_DEV_APT_DEPS= --build-arg ADDITIONAL_DEV_APT_ENV= --build-arg ADDITIONAL_RUNTIME_APT_COMMAND= --build-arg ADDITIONAL_RUNTIME_APT_DEPS= --build-arg ADDITIONAL_RUNTIME_APT_ENV= --build-arg UPGRADE_TO_NEWER_DEPENDENCIES=false --build-arg CONSTRAINTS_GITHUB_REPOSITORY=apache/airflow --build-arg AIRFLOW_CONSTRAINTS_REFERENCE=constraints-main --build-arg AIRFLOW_CONSTRAINTS=constraints-source-providers --build-arg AIRFLOW_IMAGE_REPOSITORY=https://github.com/apache/airflow --build-arg AIRFLOW_IMAGE_DATE_CREATED=2022-02-09T09:24:11Z --build-arg BUILD_ID=0 --build-arg COMMIT_SHA=ebf76087147 0446fb5e0cd58edf8fec32547e65e --cache-from=ghcr.io/apache/airflow/main/ci/python3.7:cache -t ghcr.io/apache/airflow/main/ci/python3.7 --target main . -f Dockerfile.ci ``` ### Operating System macOS ### Versions of Apache Airflow Providers _No response_ ### Deployment Other ### Deployment details _No response_ ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
