FROM alpine AS builder ARG VERSION=0.0.0 ADD carto-distribution-${VERSION}-bin.tar.gz /carto-si RUN mkdir -p /carto-si/entrypoint COPY entrypoint.sh /carto-si/entrypoint/entrypoint.sh COPY carto-si.properties /carto-si/entrypoint/carto-si.properties RUN chmod a+rx /carto-si/entrypoint && \ chmod a+rx /carto-si/entrypoint/entrypoint.sh && \ chmod a+r /carto-si/entrypoint/carto-si.properties FROM alpine RUN apk add openjdk11-jre-headless argon2-dev && \ mkdir -p /carto-si/data && \ adduser --uid 1500 -g "Carto-SI" --disabled-password carto-si && \ chown carto-si /carto-si/data COPY --from=builder /carto-si/client /carto-si/client COPY --from=builder /carto-si/core /carto-si/core COPY --from=builder /carto-si/entrypoint /carto-si/entrypoint USER carto-si WORKDIR /carto-si ENV JAVAOPTS="-Xmx4096m -Xms4096m" ENTRYPOINT ["/carto-si/entrypoint/entrypoint.sh"] CMD java $JAVAOPTS -classpath `ls /carto-si/core/* | tr "\n" ':'` synapse.carto.Runner /carto-si/