2018-10-08 09:36:20 +00:00
|
|
|
# Dockerfile for git-bridge
|
|
|
|
|
2019-04-17 09:21:41 +00:00
|
|
|
FROM maven:3-jdk-8
|
2018-10-08 09:36:20 +00:00
|
|
|
|
2019-04-17 11:45:21 +00:00
|
|
|
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
|
|
|
|
|
2019-04-26 18:07:58 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install --no-install-recommends -y \
|
|
|
|
git \
|
|
|
|
&& rm -rf \
|
|
|
|
/var/lib/apt/lists/*
|
|
|
|
|
2019-04-17 11:45:21 +00:00
|
|
|
USER www-data
|
|
|
|
|
|
|
|
ENTRYPOINT ["java", "-jar", "/git-bridge.jar"]
|
|
|
|
CMD ["/conf/runtime.json"]
|
|
|
|
|
|
|
|
COPY --from=0 /git-bridge.jar /
|