Created
November 21, 2014 01:35
-
-
Save uehaj/35aba1df7cff13524e2a 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 onesysadmin/gvm | |
# [Build] | |
# cd /path/to/grails/project | |
# docker build -t you/product . | |
# [Run] | |
# docker run -it -v /path/to/grails/project:/app --link pg:db you/project:latest | |
# docker run -d -v /path/to/grails/project:/app --link pg:db you/project:latest run-app | |
ENV PROXY_HOST 1.2.3.4 # proxy address/hostname | |
ENV PROXY_PORT 18080 # proxy port | |
ENV http_proxy http://${PROXY_HOST}:${PROXY_PORT}/ | |
ENV https_proxy http://${PROXY_HOST}:${PROXY_PORT}/ | |
RUN mkdir /app | |
WORKDIR /app | |
# Set default Grails Java Runtime env | |
ENV JAVA_OPTS -Xms256m -Xmx512m -XX:MaxPermSize=256m -Djetty.serverHost=0.0.0.0 | |
ENTRYPOINT [ "/usr/local/bin/gvm-exec.sh", "grails", "-Dgrails.work.dir=/app/.grails" ] | |
CMD ["interactive"] | |
EXPOSE 8080 | |
# install newest version of the 2.4.x branch | |
RUN gvm-wrapper.sh install grails 2.4.4 && \ | |
gvm-wrapper.sh flush archives && \ | |
cd /app && \ | |
gvm-exec.sh grails -Dgrails.work.dir=/app/.grails add-proxy client --host="${PROXY_HOST}" --port="${PROXY_PORT}" && \ | |
gvm-exec.sh grails -Dgrails.work.dir=/app/.grails set-proxy client | |
RUN mv /root/.grails/ProxySettings.groovy /root/.grails/ProxySettings.groovy.bak && \ | |
sed -e "s/'http.nonProxyHosts':''/'http.nonProxyHosts':'localhost'/" /root/.grails/ProxySettings.groovy.bak > /root/.grails/ProxySettings.groovy | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment