Last active
March 17, 2020 22:06
-
-
Save ppiotrow/6ab4e25435f72d2e2e6529c1650cefe1 to your computer and use it in GitHub Desktop.
This file contains 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 docker.artifactory.mycompany.com/theteam/openjre:11.0.5-0-e58ca54 as stage0 | |
LABEL snp-multi-stage="intermediate" | |
LABEL snp-multi-stage-id="8c5dc02e-39e8-42ce-9edd-2b2c153f4555" | |
WORKDIR /opt/my-project | |
COPY opt /opt | |
COPY 1/opt /1/opt | |
COPY 2/opt /2/opt | |
USER root | |
RUN ["chmod", "-R", "u=rX,g=rX", "/1/opt/my-project"] | |
RUN ["chmod", "-R", "u=rX,g=rX", "/2/opt/my-project"] | |
RUN ["chmod", "u+x,g+x", "/1/opt/my-project/bin/my-project"] | |
FROM docker.artifactory.mycompany.com/theteam/openjre:11.0.5-0-e58ca54 | |
USER root | |
RUN id -u demiourgos728 1>/dev/null 2>&1 || (( getent group 0 1>/dev/null 2>&1 || ( type groupadd 1>/dev/null 2>&1 && groupadd -g 0 root || addgroup -g 0 -S root )) && ( type useradd 1>/dev/null 2>&1 && useradd --system --create-home --uid 1001 --gid 0 demiourgos728 || adduser -S -u 1001 -G root demiourgos728 )) | |
WORKDIR /opt/my-project | |
COPY --from=stage0 --chown=demiourgos728:root /1/opt/my-project /opt/my-project | |
COPY --from=stage0 --chown=demiourgos728:root /2/opt/my-project /opt/my-project | |
EXPOSE 9090 | |
USER 1001:0 | |
ENTRYPOINT ["/opt/my-project/bin/my-project"] | |
CMD [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment