Skip to content

Commit

Permalink
Modified dockerfiles to honor local architecture when it's not amd64 …
Browse files Browse the repository at this point in the history
…(notably useful for producing native arm64 images for Apple Silicon)
  • Loading branch information
baro authored and baro committed May 9, 2022
1 parent d7ec495 commit 6699d9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions docker/runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,18 @@ RUN set -x && apt-get update -qq && \
libldap-2.4-2 \
libmagic-dev \
libthrift-dev \
ctags && \
ctags \
tini && \
apt-get clean && \
rm -rf /var/lib/apt/lists/ && \
set +x

ENV TINI_VERSION v0.18.0

# Copy CodeCompass installed directory. (Change permission of the CodeCompass package.)
COPY --from=builder /CodeCompass-install /codecompass

ENV PATH="/codecompass/bin:$PATH"

ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

ENTRYPOINT ["/tini", "--"]
ENTRYPOINT ["tini", "--"]

6 changes: 2 additions & 4 deletions docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ RUN set -x && apt-get update -qq \
libodb-pgsql-dev \
# To switch user and exec command.
gosu \
tini \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& set +x
Expand All @@ -41,7 +42,6 @@ ARG CC_UID=960
ENV CC_GID ${CC_GID}
ENV CC_UID ${CC_UID}

ENV TINI_VERSION v0.18.0

# Create user and group for CodeCompass.
RUN groupadd --system codecompass --gid ${CC_GID} && \
Expand All @@ -56,11 +56,9 @@ ENV PATH="/codecompass/bin:$PATH"
COPY --chown=codecompass:codecompass docker/web/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod a+x /usr/local/bin/entrypoint.sh

ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

EXPOSE 8080

ENTRYPOINT ["/tini", "--", "/usr/local/bin/entrypoint.sh"]
ENTRYPOINT ["tini", "--", "/usr/local/bin/entrypoint.sh"]

CMD ["CodeCompass_webserver", "-w", "/workspace", "-p", "8080"]

0 comments on commit 6699d9f

Please sign in to comment.