-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.java8
29 lines (20 loc) · 986 Bytes
/
Dockerfile.java8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM ubuntu:xenial
MAINTAINER Milan Simonovic <[email protected]>
# update to invalidate docker's cache and force apt-get update
ENV REFRESHED_AT 2017-01-12
## java first:
##
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update; apt-get install -y software-properties-common
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
RUN add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
apt-get install -y oracle-java8-installer oracle-java8-set-default
RUN rm -rf /tmp/* /var/tmp/* /var/cache/oracle-jdk8-installer
# to cleanup
#RUN apt-get remove -yq software-properties-common && \
# apt-get autoremove -yq && \
# apt-get clean -yq && \
# rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle