Skip to content

Commit

Permalink
docker - provide unzipped war (#664)
Browse files Browse the repository at this point in the history
* docker - provide unzipped war

* take into account edevos review
  • Loading branch information
fvanderbiest authored Nov 14, 2023
1 parent 59e7d1d commit ade5226
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
FROM alpine:latest as extractwar
RUN apk --no-cache add unzip
WORKDIR /tmp
COPY docker/MapStore-*.war mapstore.war
RUN unzip mapstore.war -d mapstore


FROM tomcat:9-jdk11-openjdk
MAINTAINER geosolutions<[email protected]>

Expand All @@ -11,8 +18,8 @@ RUN if [ "$TOMCAT_EXTRAS" = false ]; then \
find "${CATALINA_BASE}/webapps/" -delete; \
fi

# Add war files to be deployed
COPY docker/*.war "${CATALINA_BASE}/webapps/mapstore.war"
# Add application from first stage
COPY --from=extractwar /tmp/mapstore "${CATALINA_BASE}/webapps/mapstore"

# Geostore externalization template. Disabled by default
# COPY docker/geostore-datasource-ovr.properties "${CATALINA_BASE}/conf/"
Expand Down

4 comments on commit ade5226

@fgravin
Copy link
Member

@fgravin fgravin commented on ade5226 Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fvanderbiest could you expand a bit about the meaning of this change please ?
What WARs are supposed to land in /docker before the docker build ?
Is there a documentation about that ?

before this commit, ./build.sh generated a mapstore.war that was usually copied to /docker.
Thanks for info.

@fvanderbiest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Florent,
Did you see my comments on #664 ?

@fgravin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you see my comments on #664 ?

Nope I didn't see the link in the comment (thought that it was something from github), my bad !

@fgravin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLDR: the Dockerfile works with the github action but not with the main build script.

--
What is confusing is that the common way to build MapStore is with ./build.sh. The build.sh script and the Dockerfile should be aligned.
It seems that you are maintaining a github workflow which builds the project instead of the build.sh, and that you aligned the Dockerfile with it without back porting those changes to the ./build.sh, am I correct ?

Please sign in to comment.