From 3b25e4c2e04d9d84a9b5ff80e7f47b19dcb5bf10 Mon Sep 17 00:00:00 2001 From: Jon Brouse Date: Tue, 29 Aug 2017 15:03:57 +0000 Subject: [PATCH] Alpine poc --- docker-compose-build.yml | 16 --------------- docker-compose-template.yml | 41 ++++++++++++++++++++++--------------- ice/Dockerfile | 29 +++++++++++--------------- 3 files changed, 36 insertions(+), 50 deletions(-) delete mode 100644 docker-compose-build.yml diff --git a/docker-compose-build.yml b/docker-compose-build.yml deleted file mode 100644 index 8a995f2..0000000 --- a/docker-compose-build.yml +++ /dev/null @@ -1,16 +0,0 @@ -ice: - build: ice - command: | - -Djava.net.preferIPv4Stack=true - -Djava.net.preferIPv4Addresses - -Dice.s3AccessKeyId= - -Dice.s3SecretKey= - run-app - volumes: - - ./ice/assets/ice.properties:/opt/ice/src/java/ice.properties -nginx: - build: nginx - ports: - - "80:80" - links: - - ice:ice diff --git a/docker-compose-template.yml b/docker-compose-template.yml index 83f5a88..9669ba5 100644 --- a/docker-compose-template.yml +++ b/docker-compose-template.yml @@ -1,17 +1,24 @@ -ice: - image: jonbrouse/ice:latest - command: | - -Djava.net.preferIPv4Stack=true - -Djava.net.preferIPv4Addresses - -Duser.timezone= - -Dice.s3AccessKeyId= - -Dice.s3SecretKey= - run-app - volumes: - - ./ice/assets/ice.properties:/opt/ice/src/java/ice.properties -nginx: - image: jonbrouse/ice-proxy:latest - ports: - - "80:80" - links: - - ice:ice +version: '3' +services: + ice: + build: ice + hostname: ice + image: jonbrouse/ice:latest + command: | + -Djava.net.preferIPv4Stack=true + -Djava.net.preferIPv4Addresses + -Duser.timezone= + -Dice.s3AccessKeyId= + -Dice.s3SecretKey= + run-app + volumes: + - ./ice/assets/ice.properties:/opt/ice/src/java/ice.properties + nginx: + hostname: nginx + image: nginx:1.13.3-alpine + ports: + - "80:80" + links: + - ice:ice + volumes: + - ./nginx/assets/default.conf:/etc/nginx/conf.d/default.conf diff --git a/ice/Dockerfile b/ice/Dockerfile index 8a4043c..f6b76b7 100644 --- a/ice/Dockerfile +++ b/ice/Dockerfile @@ -1,4 +1,4 @@ -FROM jonbrouse/java:7 +FROM openjdk:8u131-jdk-alpine MAINTAINER Jon Brouse @jonbrouse ENV INSTALL_DIR /opt/ice @@ -6,31 +6,26 @@ ENV HOME_DIR /root ENV GRAILS_VERSION 2.4.4 ENV GRAILS_HOME ${HOME_DIR}/.grails/wrapper/${GRAILS_VERSION}/grails-${GRAILS_VERSION} ENV PATH $PATH:${HOME_DIR}/.grails/wrapper/${GRAILS_VERSION}/grails-${GRAILS_VERSION}/bin/ -ENV ICE_VERSION 1.1.1 +ENV ICE_VERSION 1.1.2 ARG JAVA_OPTS -WORKDIR ${HOME_DIR} +WORKDIR ${HOME_DIR}/.grails/wrapper/${GRAILS_VERSION} # Install required software -RUN \ - curl -Lo unzip.deb http://http.us.debian.org/debian/pool/main/u/unzip/unzip_6.0-16+deb8u3_amd64.deb && \ - dpkg -i unzip.deb && \ - mkdir -p ${INSTALL_DIR} && \ - mkdir -p .grails/wrapper/${GRAILS_VERSION} && \ - unzip /root/grails-${GRAILS_VERSION}.zip -d .grails/wrapper/${GRAILS_VERSION} && \ - rm -rf unzip.deb ${GRAILS_VERSION}/grails-${GRAILS_VERSION}.zip +RUN apk add --no-cache bash curl unzip && \ + curl -O http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-${GRAILS_VERSION}.zip && \ + unzip grails-${GRAILS_VERSION}.zip && \ + rm -rf grails-${GRAILS_VERSION}.zip WORKDIR ${INSTALL_DIR} # Ice setup -RUN \ - mkdir /mnt/ice_processor && \ - mkdir /mnt/ice_reader && \ - curl -L https://github.com/Teevity/ice/archive/v${ICE_VERSION}.tar.gz | tar -zx -C /opt/ice --strip 1 && \ - grails ${JAVA_OPTS} wrapper && \ - rm grails-app/i18n/messages.properties && \ - sed -i -e '1i#!/bin/bash\' grailsw +RUN mkdir /mnt/ice_processor /mnt/ice_reader && \ + curl -fsSL https://github.com/Teevity/ice/archive/v${ICE_VERSION}.tar.gz | tar zx --strip-components=1 && \ + grails ${JAVA_OPTS} wrapper && \ + rm grails-app/i18n/messages.properties && \ + sed -i -e '1i#!/bin/bash\' grailsw EXPOSE 8080