Use latest official Docker java image as a basis.

This image is a debian Jessie with an openjdk-8 from debian backports.
This avoid downloading openjdk dependencies through apt-get each time
YaCy docker image is built.
This commit is contained in:
luc 2016-05-31 00:12:18 +02:00
parent 9ca2b140d8
commit e180170152

View File

@ -1,17 +1,18 @@
# Build a docker image from latest YaCy sources # Build a docker image from latest YaCy sources
# Base image : latest stable Debian # Base image : latest stable official jdk container from Docker (Debian based)
FROM debian:latest FROM java:latest
# Install needed packages # Install needed packages
RUN apt-get update && apt-get install -yq \ RUN apt-get update && apt-get install -yq \
default-jdk \
default-jre-headless \
ant \ ant \
git \ git \
curl \ curl \
sudo sudo
# trace java version
RUN java -version
# set current working dir # set current working dir
WORKDIR /opt WORKDIR /opt
@ -39,7 +40,6 @@ RUN chown yacy:yacy -R /opt/yacy_search_server
# make some cleaning to reduce image size # make some cleaning to reduce image size
RUN rm -rf .git \ RUN rm -rf .git \
&& apt-get purge -yq --auto-remove \ && apt-get purge -yq --auto-remove \
default-jdk \
ant \ ant \
git \ git \
&& apt-get clean && apt-get clean