Skip to content

Commit

Permalink
update Dockerfile: download baas inside docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
Takuya Murakami committed Nov 19, 2018
1 parent 8ea08ba commit 39e9e2c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
6 changes: 5 additions & 1 deletion Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion both/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion console/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 39e9e2c

Please sign in to comment.