From 39e9e2c48601fcf5d83585b4acf9f46bf61be464 Mon Sep 17 00:00:00 2001 From: Takuya Murakami Date: Mon, 19 Nov 2018 15:14:07 +0900 Subject: [PATCH] update Dockerfile: download baas inside docker build --- Dockerfile.in | 6 +++++- Makefile | 8 ++++---- api/Dockerfile | 6 +++++- both/Dockerfile | 6 +++++- console/Dockerfile | 6 +++++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Dockerfile.in b/Dockerfile.in index 722f818..c223b28 100644 --- a/Dockerfile.in +++ b/Dockerfile.in @@ -21,6 +21,10 @@ EXPOSE 8080 # Install BaaS Server ENV BAAS_VERSION 7.5.0 -ADD files/baas-server-$BAAS_VERSION/server/%%SERVER_TYPE%%.war /opt/tomcat/webapps/ +RUN cd /opt \ + && wget --no-check-certificate https://github.com/nec-baas/baas-server/releases/download/v$BAAS_VERSION/baas-server-$BAAS_VERSION.tar.gz \ + && tar xzf baas-server-$BAAS_VERSION.tar.gz \ + && cp baas-server-$BAAS_VERSION/server/%%SERVER_TYPE%%.war /opt/tomcat/webapps/ \ + && /bin/rm -rf baas-server-$BAAS_VERSION* CMD /bootstrap.sh diff --git a/Makefile b/Makefile index 6a43cb5..fdd0c39 100644 --- a/Makefile +++ b/Makefile @@ -6,12 +6,12 @@ NAME_API = necbaas/api-server NAME_CONSOLE = necbaas/console-server NAME_BOTH = necbaas/api-console-server -.PHONY: download api console both +.PHONY: api console both -all: download api console both +all: api console both -download: - @./download.sh +#download: +# @./download.sh update: api/Dockerfile console/Dockerfile both/Dockerfile diff --git a/api/Dockerfile b/api/Dockerfile index a7b24c4..bbcb586 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -21,6 +21,10 @@ EXPOSE 8080 # Install BaaS Server ENV BAAS_VERSION 7.5.0 -ADD files/baas-server-$BAAS_VERSION/server/api.war /opt/tomcat/webapps/ +RUN cd /opt \ + && wget --no-check-certificate https://github.com/nec-baas/baas-server/releases/download/v$BAAS_VERSION/baas-server-$BAAS_VERSION.tar.gz \ + && tar xzf baas-server-$BAAS_VERSION.tar.gz \ + && cp baas-server-$BAAS_VERSION/server/api.war /opt/tomcat/webapps/ \ + && /bin/rm -rf baas-server-$BAAS_VERSION* CMD /bootstrap.sh diff --git a/both/Dockerfile b/both/Dockerfile index 7069d7a..896f8ba 100644 --- a/both/Dockerfile +++ b/both/Dockerfile @@ -21,6 +21,10 @@ EXPOSE 8080 # Install BaaS Server ENV BAAS_VERSION 7.5.0 -ADD files/baas-server-$BAAS_VERSION/server/*.war /opt/tomcat/webapps/ +RUN cd /opt \ + && wget --no-check-certificate https://github.com/nec-baas/baas-server/releases/download/v$BAAS_VERSION/baas-server-$BAAS_VERSION.tar.gz \ + && tar xzf baas-server-$BAAS_VERSION.tar.gz \ + && cp baas-server-$BAAS_VERSION/server/*.war /opt/tomcat/webapps/ \ + && /bin/rm -rf baas-server-$BAAS_VERSION* CMD /bootstrap.sh diff --git a/console/Dockerfile b/console/Dockerfile index 41c6443..4f2edde 100644 --- a/console/Dockerfile +++ b/console/Dockerfile @@ -21,6 +21,10 @@ EXPOSE 8080 # Install BaaS Server ENV BAAS_VERSION 7.5.0 -ADD files/baas-server-$BAAS_VERSION/server/console.war /opt/tomcat/webapps/ +RUN cd /opt \ + && wget --no-check-certificate https://github.com/nec-baas/baas-server/releases/download/v$BAAS_VERSION/baas-server-$BAAS_VERSION.tar.gz \ + && tar xzf baas-server-$BAAS_VERSION.tar.gz \ + && cp baas-server-$BAAS_VERSION/server/console.war /opt/tomcat/webapps/ \ + && /bin/rm -rf baas-server-$BAAS_VERSION* CMD /bootstrap.sh