FROM frekele/java:jdk7
MAINTAINER jiankunking
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/