You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/01 13:22:14 UTC
[GitHub] [airflow] davidgin opened a new issue #21894: Extending Docker image fails when adding build-essential
davidgin opened a new issue #21894:
URL: https://github.com/apache/airflow/issues/21894
### Apache Airflow version
2.2.4 (latest released)
### What happened
When extending the docker image with build-essential
I added according to the [documentation ](https://airflow.apache.org/docs/docker-stack/build.html#customizing-the-image) to my DockerFile .
```
I get the following error : Setting up libc6:amd64 (2.33-7) ...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
dpkg: error processing package libc6:amd64 (--configure):
installed libc6:amd64 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/bash -o pipefail -o errexit -o nounset -o nolog -c apt-get update && apt-get install -y --no-install-recommends build-essential && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
```
My DockerFile is
`:FROM dockerhub.artifactory..****/apache/airflow:2.2.4
USER root
RUN sh -c "echo > /etc/apt/sources.list"
RUN sh -c "echo 'deb-src https://artifactory.******/artifactory/debian/ buster main' >> /etc/apt/sources.list"
RUN sh -c "echo 'deb https://artifactory.*****/artifactory/mysql-debian/ buster mysql-8.0' >> /etc/apt/sources.list"
RUN sh -c "echo 'deb https://artifactory.*******/artifactory/debian/ sid main' >> /etc/apt/sources.list"
RUN sh -c "echo 'deb https://artifactory.****/artifactory/debian-packages/ buster main' >> /etc/apt/sources.list"
RUN sh -c "echo 'deb https://artifactory*****/artifactory/debian-packages/ buster libc6' >> /etc/apt/sources.list"
**RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \**
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER airflow
RUN pip install --no-cache-dir --user apache-airflow-providers-apache-hive==2.1.0 -i https://artifactory.*****/artifactory/api/pypi/pypi-remote/simple
`
This seems to related to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974552) in debian distribution .
### What you expected to happen
I expect build-essential package to be unpacked and installed successfully.
The log I get `
Setting up libc6:amd64 (2.33-7) ...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
dpkg: error processing package libc6:amd64 (--configure):
installed libc6:amd64 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/bash -o pipefail -o errexit -o nounset -o nolog -c apt-get update && apt-get install -y --no-install-recommends build-essential && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/*' `
### How to reproduce
(I use an internal artifactory mirror but the bug persists also when running locally )
Build the docker image according to official documentation.
docs/docker-stack/docker-examples/extending/add-build-essential-extend/Dockerfile
FROM apache/airflow:2.2.4
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
**build-essential** libopenmpi-dev \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER airflow
RUN pip install --no-cache-dir mpi4py
### Operating System
The host is CentOS Linux release 7.9.2009 (Core).
### Versions of Apache Airflow Providers
apache-airflow-providers-apache-hive==2.1.0
### Deployment
Other Docker-based deployment
### Deployment details
_No response_
### Anything else
Happens Every time
### Are you willing to submit PR?
- [ ] 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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #21894: Extending Docker image fails when adding build-essential
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #21894:
URL: https://github.com/apache/airflow/issues/21894#issuecomment-1055437886
Thanks for opening your first issue here! Be sure to follow the issue template!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org