[docker] build the git-bridge in docker

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
This commit is contained in:
Jakob Ackermann
2019-04-17 13:45:21 +02:00
parent 1da276fe2b
commit 2ebae69044
3 changed files with 43 additions and 11 deletions
+18 -1
View File
@@ -13,4 +13,21 @@ RUN apt-get update && \
RUN mkdir /app
WORKDIR /app
WORKDIR /app
COPY . /app
RUN mvn clean package \
# The name of the created jar contains the current version tag.
# Rename it to a static path that can be used for copying.
&& find /app/target \
-name 'writelatex-git-bridge*jar-with-dependencies.jar' \
-exec mv {} /git-bridge.jar \;
FROM openjdk:8-jre
USER www-data
ENTRYPOINT ["java", "-jar", "/git-bridge.jar"]
CMD ["/conf/runtime.json"]
COPY --from=0 /git-bridge.jar /