diff --git a/.env b/.env new file mode 100644 index 0000000..66e486f --- /dev/null +++ b/.env @@ -0,0 +1 @@ +MENDELSON_VERSION=1.1b53 \ No newline at end of file diff --git a/Makefile b/Makefile index c2bfdfc..1ac7954 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,14 @@ -MENDELSON_AS2_VERSION = 1.1b51 +include .env -.PHONY : image +.PHONY : image start -image : image/mendelson-$(MENDELSON_AS2_VERSION).zip - docker build image -t saver/mendelson-as2:$(MENDELSON_AS2_VERSION) +image : image/mendelson-$(MENDELSON_VERSION).zip + docker build --build-arg MENDELSON_VERSION=$(MENDELSON_VERSION) -t saver/mendelson-as2:$(MENDELSON_VERSION) image -image/mendelson-$(MENDELSON_AS2_VERSION).zip : - curl -L http://downloads.sourceforge.net/project/mec-as2/install_mendelson_opensource_as2_$(MENDELSON_AS2_VERSION).zip > $@ +image/mendelson-$(MENDELSON_VERSION).zip : + curl -L http://downloads.sourceforge.net/project/mec-as2/install_mendelson_opensource_as2_$(MENDELSON_VERSION).zip > $@ + +start : + docker-compose up -d + HTTP_PORT=$$(docker-compose port as2 8080 | cut -d: -f2);\ + echo Use http://localhost:$${HTTP_PORT} to connect to your Mendelson AS2 \ No newline at end of file diff --git a/README.md b/README.md index 43987a7..60f29fa 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,16 @@ You may just skip the build and use image from Docker Hub docker-compose up -d + or + + make start + 2. Look for port mappings with command: docker-compose ps -3. Use browser and vncviewer with appropriate ports and password from files 'wd/vncpasswd' and 'wd/webpasswd', watch +3. Use browser and vncviewer with appropriate ports and password from files 'image/custom/vncpasswd' and 'image/custom/webpasswd', watch logs in wd folder diff --git a/docker-compose.yml b/docker-compose.yml index b786e69..05f04d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: as2: container_name: mendelson-as2 build: image - image: saver/mendelson-as2:1.1b51 + image: "saver/mendelson-as2:${MENDELSON_VERSION}" ports: - "5901" - "8080" diff --git a/image/Dockerfile b/image/Dockerfile index eba76ae..49aff37 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -3,7 +3,7 @@ FROM centos:7.3.1611 MAINTAINER Dmitry Myasnikov ENV MENDELSON_HOME /opt/mendelson/as2 -ENV MENDELSON_VERSION 1.1b51 +ARG MENDELSON_VERSION=1.1b51 RUN yum install -y java-1.8.0-openjdk unzip tigervnc-server xorg-x11-server-Xvfb && \ yum clean all && mkdir -p $MENDELSON_HOME