docker-airflow icon indicating copy to clipboard operation
docker-airflow copied to clipboard

How can I install other packages to this image?

Open MauricioLins opened this issue 4 years ago • 1 comments

I am trying to install ssh through the docker compose calling the dockerfile, simple like that:

FROM puckel/docker-airflow

RUN apt-get install -y net-tools
RUN apt-get install -y openssh-server apache2 supervisor
RUN mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

And I am getting this error:

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Even if I try manually logging as root and run these commands it does not work.

I am thinking is better to get the airflow original's image and configure everything.

Any thoughts about it?

MauricioLins avatar Aug 20 '20 08:08 MauricioLins

This looks like you're going to try to put an apache server in front of the airflow webserver on the same container. If that is the case, I would suggest using the httpd image as a separate micro-service.

mschmo avatar Aug 21 '20 04:08 mschmo