-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update dockerfile to jdk8 and cleanup build #390
Conversation
CMD ["/usr/bin/java","-server","-Dconfig.file=/opt/collins/conf/production.conf","-Dhttp.port=9000","-Dlogger.file=/opt/collins/conf/logger.xml","-Dnetworkaddress.cache.ttl=1","-Dnetworkaddress.cache.negative.ttl=1","-Dcom.sun.management.jmxremote","-Dcom.sun.management.jmxremote.port=3333","-Dcom.sun.management.jmxremote.authenticate=false","-Dcom.sun.management.jmxremote.ssl=false","-XX:MaxPermSize=384m","-XX:+CMSClassUnloadingEnabled","-XX:+PrintGCDetails","-XX:+PrintGCTimeStamps","-XX:+PrintGCDateStamps","-XX:+PrintTenuringDistribution","-XX:+PrintHeapAtGC","-Xloggc:/var/log/collins/gc.log","-XX:+UseGCLogFileRotation","-cp","/opt/collins/lib/*","play.core.server.NettyServer","/opt/collins"] | ||
# expose HTTP, JMX | ||
EXPOSE 9000 3333 | ||
CMD ["/usr/bin/java","-server","-Dconfig.file=/opt/collins/conf/production.conf","-Dhttp.port=9000","-Dlogger.file=/opt/collins/conf/logger.xml","-Dnetworkaddress.cache.ttl=1","-Dnetworkaddress.cache.negative.ttl=1","-Dcom.sun.management.jmxremote","-Dcom.sun.management.jmxremote.port=3333","-Dcom.sun.management.jmxremote.authenticate=false","-Dcom.sun.management.jmxremote.ssl=false","-XX:MaxPermSize=384m","-XX:+CMSClassUnloadingEnabled","-cp","/opt/collins/lib/*","play.core.server.NettyServer","/opt/collins"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this extremely long line be split to multiple lines please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, actually. Dockerfile syntax requires it is on one line :(
👍 assuming it works :-) |
MAINTAINER Gabe Conradi <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y zip unzip && rm -r /var/lib/apt/lists/* | ||
|
||
RUN useradd -Ur -d /opt/collins collins | ||
RUN for dir in /build /build/collins /var/log/collins /var/run/collins; do mkdir $dir; chown collins $dir; done | ||
ENV ACTIVATOR_VERSION 1.3.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels a little off to have this env var sitting around, since it's not used for anything except building the container. What about moving it to the top of the RUN
section, rather than having it as a global ENV
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
LGTM aside from that one comment I left. Breaking out |
@lpstein ive updated with your suggestion, thanks! |
RUN wget -q http://downloads.typesafe.com/typesafe-activator/1.3.6/typesafe-activator-1.3.6-minimal.zip -O /build/typesafe-activator-1.3.6-minimal.zip && \ | ||
unzip -q ./typesafe-activator-1.3.6-minimal.zip && \ | ||
RUN cd /build && \ | ||
export ACTIVATOR_VERSION=1.3.7 && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be "export"ed or would a simple shell variable set be enough? i.e. is it used by any subprocesses or just the single shell that the RUN uses?
Personally I wouldn't bother doing this since it is pretty buried in the file middle of the file anyway, just inline it in the single place it is used, but YMMV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesnt matter. its only within the context of this RUN
command, so nothing leaks out into the built image.
update dockerfile to jdk8 and cleanup build
@tumblr/systems This dockerfile has gone unloved for a while, so I thought I would simplify and cleanup some. This appears to improve startup times drastically (not writing GC logs to the overlay FS helps :P). JDK bumped to 8, activator to 1.3.7.