Skip to content

Instantly share code, notes, and snippets.

@b4tman
Created August 14, 2020 10:46
Show Gist options
  • Save b4tman/f961d9524d9ee913d7f286fe862eeb30 to your computer and use it in GitHub Desktop.
Save b4tman/f961d9524d9ee913d7f286fe862eeb30 to your computer and use it in GitHub Desktop.
1C-Исполнитель в Docker
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"]
@b4tman
Copy link
Author

b4tman commented Aug 14, 2020

(бета версия)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment