Open ravieze opened 6 years ago
may be that will help you. This is my docker image with Java 8 installed I created my own docker image based on that one and put this inside:
FROM puckel/docker-airflow:1.9.0
COPY requirements.txt /
# install Java
USER root
RUN mkdir -p /usr/share/man/man1 && \
(echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list) && \
apt-get update -y && \
apt-get install -t jessie-backports openjdk-8-jdk -y
RUN apt-get install unzip -y && \
apt-get autoremove -y
USER airflow
Thanks to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 you just have to execute mkdir -p /usr/share/man/man1
before apt install -y openjdk-8-jdk
command in order to install Open JDK 8 on Debian Stretch.
@Jonathan34 docker image built with the above script does not start up. It doesn't log anything either. Also, when I try with the new version of the base image (i.e. 1.10.1), I get the following error:
The following packages have unmet dependencies:
openjdk-8-jdk : Depends: openjdk-8-jre (= 8u171-b11-1~bpo8+1) but it is not going to be installed
Depends: openjdk-8-jdk-headless (= 8u171-b11-1~bpo8+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c mkdir -p /usr/share/man/man1 && (echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list) && apt-get update -y && apt-get install -t jessie-backports openjdk-8-jdk -y' returned a non-zero code: 100
@Jonathan34 @anthony-o following worked for me:
FROM puckel/docker-airflow:1.10.1
# install Java
USER root
RUN mkdir -p /usr/share/man/man1 && \
apt-get update -y && \
apt-get install -y openjdk-8-jdk
RUN apt-get install unzip -y && \
apt-get autoremove -y
USER airflow
@darshanmehta10 yes we updated to that couple of months ago. openjdk was not available when i posted the image above. thanks for correcting!
As of version 1.10.9, the base image has moved to python:3.7-slim-buster
. Debian Buster appears to have removed openjdk-8
(see last message of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199)
Here's a modified version of the aforementioned Dockerfile to install openjdk-8-jdk
:
FROM puckel/docker-airflow:1.10.9
# install Java
USER root
RUN echo "deb http://security.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
RUN mkdir -p /usr/share/man/man1 && \
apt-get update -y && \
apt-get install -y openjdk-8-jdk
RUN apt-get install unzip -y && \
apt-get autoremove -y
USER airflow
There may be a better repository to add, but this one works.
As of version 1.10.9, the base image has moved to
python:3.7-slim-buster
. Debian Buster appears to have removedopenjdk-8
(see last message of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199)Here's a modified version of the aforementioned Dockerfile to install
openjdk-8-jdk
:FROM puckel/docker-airflow:1.10.9 # install Java USER root RUN echo "deb http://security.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list RUN mkdir -p /usr/share/man/man1 && \ apt-get update -y && \ apt-get install -y openjdk-8-jdk RUN apt-get install unzip -y && \ apt-get autoremove -y USER airflow
There may be a better repository to add, but this one works.
It works! thanks!
As of version 1.10.9, the base image has moved to
python:3.7-slim-buster
. Debian Buster appears to have removedopenjdk-8
(see last message of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199)Here's a modified version of the aforementioned Dockerfile to install
openjdk-8-jdk
:FROM puckel/docker-airflow:1.10.9 # install Java USER root RUN echo "deb http://security.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list RUN mkdir -p /usr/share/man/man1 && \ apt-get update -y && \ apt-get install -y openjdk-8-jdk RUN apt-get install unzip -y && \ apt-get autoremove -y USER airflow
There may be a better repository to add, but this one works.
This works. Thanks:)
Thanks to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 you just have to execute
mkdir -p /usr/share/man/man1
beforeapt install -y openjdk-8-jdk
command in order to install Open JDK 8 on Debian Stretch.
Just got nailed by this.. and yep creating that folder solves it.
Thanks to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 you just have to execute
mkdir -p /usr/share/man/man1
beforeapt install -y openjdk-8-jdk
command in order to install Open JDK 8 on Debian Stretch.
I've seen this answer given twice, not the answer sorry.
Version: version: '2.1' command to bring up the containers: docker-compose -f docker-compose-CeleryExecutor.yml up -d
Things are working fine till here. I am able to see the flower UI, DAG, run jobs etc. Sofar all good.
I want to use spark submit operator which requires me to have spark pakages installed -- which inturn need open jdk 8 to be present.
Now i tried all possible documents google can give me (eg: https://xmoexdev.com/wordpress/installing-openjdk-8-debian-jessie/) to install the open jdk 8 --but it was of no use. The installation always endsup in the below error. People report that they are able to install the openJDK when they use native Debian-8 (jessie); however, even though the docker container tells its Debian-8 Jessie, OPENJDk8 isnot installing.
The error i get during the installation is as follows. Any ideas how to fix this?