Last active
September 4, 2015 02:55
-
-
Save Wei1234c/1d525e137dc54a8e002d to your computer and use it in GitHub Desktop.
Dockerfile for Oracle-Java8 with Ubuntu on RPi2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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