Skip to content

Instantly share code, notes, and snippets.

@Wei1234c
Last active September 4, 2015 02:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Wei1234c/1d525e137dc54a8e002d to your computer and use it in GitHub Desktop.
Save Wei1234c/1d525e137dc54a8e002d 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
# 設定時區
RUN echo "Asia/Taipei" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata
# Environment variables
RUN echo " " >> /etc/bash.bashrc && \
echo "#_____________________" >> /etc/bash.bashrc && \
echo "force_color_prompt=yes" >> /etc/bash.bashrc && \
echo "alias cls='clear'" >> /etc/bash.bashrc && \
echo "export TERM=linux" >> /etc/bash.bashrc
# Define default command.
CMD ["bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment