Created
March 16, 2017 09:03
-
-
Save chussenot/932f08d6a3cbc5a0faf2011b6802c2d3 to your computer and use it in GitHub Desktop.
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
FROM frekele/gradle:3.3-jdk8u121 | |
RUN apt-get --quiet -y update | |
RUN apt-get -qq -y install git maven | |
RUN rm -rf /tmp/srfp-api && mkdir -p /tmp/srfp-api | |
ADD . /tmp/srfp-api | |
RUN cd /tmp && \ | |
git clone https://github.com/spring-projects/spring-batch-extensions.git && \ | |
cd spring-batch-extensions/spring-batch-excel && \ | |
id && \ | |
mv /tmp/spring-batch-extensions/spring-batch-excel/src/test/resources/log4j.xml /tmp/spring-batch-extensions/spring-batch-excel/src/test/resources/log4j.xml.crap && \ | |
cp /tmp/srfp-api/spring-batch-excel/log4j.xml /tmp/spring-batch-extensions/spring-batch-excel/src/test/resources/ && \ | |
mvn --quiet clean package -Dlog4j.configuration=/tmp/srfp-api/spring-batch-excel/log4j.xml && \ | |
mvn install | |
RUN cd /tmp/srfp-api/ && \ | |
gradle clean build && \ | |
ls -la ./build/libs/ && \ | |
mkdir /var/srfp && \ | |
cp -R build/libs/*.jar /var/srfp/app.jar | |
#rm -rf /tmp/srfp-api /tmp/spring-batch-extensions | |
# Specifies which profiles to use when running the spring boot application. | |
# comma separated, no spaces | |
ENV SPRING_PROFILES_ACTIVE docker | |
ENV JAVA_OPTS -Xmx1024m | |
# Expose default port for java application | |
EXPOSE 8080 | |
# The CMD is overridable. This allows to change profile and/or pass options to the app | |
CMD ["bash", "-c", "java $JAVA_OPTS -jar -Djava.security.egd=file:/dev/./urandom /var/srfp/app.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment