Created
August 14, 2020 10:46
-
-
Save b4tman/f961d9524d9ee913d7f286fe862eeb30 to your computer and use it in GitHub Desktop.
1C-Исполнитель в Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest as build | |
COPY Executor_2020_2_1_16.zip /tmp/Executor.zip | |
RUN mkdir /opt/executor | |
RUN unzip -oq /tmp/Executor.zip -d /opt/executor | |
# create launcher | |
RUN install -m 755 /opt/executor/bin/executor_j11.sh /usr/bin/executor | |
# fix SCRIPT_DIR | |
RUN sed -i -e 's/^SCRIPT_DIR=.*$/SCRIPT_DIR=\/opt\/executor\/bin/' /usr/bin/executor | |
# run script with /bin/sh instead of bash | |
RUN sed -i -e 's/\/usr\/bin\/env bash/\/bin\/sh/' /usr/bin/executor | |
# run java as pid 1 | |
RUN sed -i -e 's/^java/exec java/' /usr/bin/executor | |
FROM alpine:latest | |
RUN apk add --no-cache openjdk11-jre-headless | |
COPY --from=build /opt/executor /opt/executor | |
COPY --from=build /usr/bin/executor /usr/bin/executor | |
WORKDIR /usr/src | |
ENTRYPOINT ["/usr/bin/executor"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(бета версия)