Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JustinSDK/70b499662b6c9f06492b to your computer and use it in GitHub Desktop.
Save JustinSDK/70b499662b6c9f06492b to your computer and use it in GitHub Desktop.
Dockerfile for Oracle-Java8 with Ubuntu on RPi2
# Oracle Java 8 Dockerfile
#
# https://github.com/dockerfile/java
# https://github.com/dockerfile/java/tree/master/oracle-java8
#
# origin: https://github.com/dockerfile/java/blob/master/oracle-java8/Dockerfile
# modified by: Wei Lin
# date: 2015/9/2
# Pull base image.
FROM armv7/armhf-ubuntu:14.04
MAINTAINER Wei Lin
ENV TERM linux
# Install Java.
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
apt-get install -y oracle-java8-installer
# Upgrade and clean up
RUN apt-get dist-upgrade -y && \
apt-get remove -y software-properties-common && \
apt-get autoremove -y && \
apt-get autoclean -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
# Define working directory.
WORKDIR /data
# Define commonly used JAVA_HOME variable.
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# Append PATH
ENV PATH $PATH:$JAVA_HOME/bin
# Environment variables
RUN echo " " >> /etc/profile && \
echo "#_____________________" >> /etc/profile && \
echo "force_color_prompt=yes" >> /etc/profile && \
echo "alias cls='clear'" >> /etc/profile && \
echo "export TERM=linux" >> /etc/profile
RUN echo " " >> /root/.bashrc && \
echo "#_____________________" >> /root/.bashrc && \
echo "force_color_prompt=yes" >> /root/.bashrc && \
echo "alias cls='clear'" >> /root/.bashrc && \
echo "export TERM=linux" >> /root/.bashrc
# Define default command.
CMD ["bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment