Ant1.8.2 Jdk7 Dockerfile

衣舞晨風發表於2017-04-04
FROM frekele/java:jdk7

MAINTAINER jiankunking <jdk7 ant 1.8.2>

ENV ANT_VERSION=1.8.2 
ENV ANT_HOME=/opt/ant

# change to tmp folder
WORKDIR /tmp

# Download and extract apache ant to opt folder
RUN wget --no-check-certificate --no-cookies http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz \
    && wget --no-check-certificate --no-cookies http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz.md5 \
    && tar -zvxf apache-ant-${ANT_VERSION}-bin.tar.gz -C /opt/ \
    && ln -s /opt/apache-ant-${ANT_VERSION} /opt/ant \
    && rm -f apache-ant-${ANT_VERSION}-bin.tar.gz \
    && rm -f apache-ant-${ANT_VERSION}-bin.tar.gz.md5

# add executables to path
RUN update-alternatives --install "/usr/bin/ant" "ant" "/opt/ant/bin/ant" 1 && \
    update-alternatives --set "ant" "/opt/ant/bin/ant" 

# Add the files
# ADD rootfs /

# change to root folder
WORKDIR /root

本文參考:https://hub.docker.com/r/frekele/ant/

其他版本參考:https://hub.docker.com/r/frekele/ant/

本文作者:jiankunking,出處:http://blog.csdn.net/jiankunking/

相關文章