2018-10-08 05:36:20 -04:00
|
|
|
# Dockerfile for git-bridge
|
|
|
|
|
2020-12-10 09:51:05 -05:00
|
|
|
FROM maven:3-jdk-8 as base
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y make \
|
|
|
|
&& rm -rf /var/lib/apt/lists
|
|
|
|
|
|
|
|
RUN useradd --create-home node
|
|
|
|
|
|
|
|
FROM base as builder
|
2018-10-08 05:36:20 -04:00
|
|
|
|
2019-04-17 07:45:21 -04:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . /app
|
2020-12-10 09:51:05 -05:00
|
|
|
RUN make package \
|
2019-04-17 07:45:21 -04:00
|
|
|
# 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
|
|
|
|
|
2021-04-30 10:47:07 -04:00
|
|
|
RUN apt-get update && apt-get install -y git gettext-base\
|
2020-12-10 09:51:05 -05:00
|
|
|
&& rm -rf /var/lib/apt/lists
|
2019-04-26 14:07:58 -04:00
|
|
|
|
2020-12-10 09:51:05 -05:00
|
|
|
RUN useradd --create-home node
|
2019-04-17 07:45:21 -04:00
|
|
|
|
2021-04-30 10:47:07 -04:00
|
|
|
CMD ["/start.sh"]
|
2019-04-17 07:45:21 -04:00
|
|
|
|
2020-12-10 09:51:05 -05:00
|
|
|
COPY --from=builder /git-bridge.jar /
|
|
|
|
|
2021-04-30 10:47:07 -04:00
|
|
|
COPY conf/envsubst_template.json envsubst_template.json
|
|
|
|
COPY start.sh start.sh
|
|
|
|
|
|
|
|
RUN mkdir conf
|
|
|
|
RUN chown node:node conf
|
|
|
|
|
2020-12-10 09:51:05 -05:00
|
|
|
USER node
|