2022-05-27 15:46:58 +00:00
ARG OTP_VERSION
FROM docker.io/library/erlang:${OTP_VERSION} AS builder
COPY . /holmes
WORKDIR /holmes
2024-04-18 05:31:29 +00:00
RUN make \
&& ./clone-proto-modules.sh /repos
2022-05-27 15:46:58 +00:00
2024-01-18 11:30:27 +00:00
FROM docker.io/library/erlang:${OTP_VERSION}-slim
2022-05-27 15:46:58 +00:00
2024-04-18 05:31:29 +00:00
SHELL [ "/bin/bash" , "-o" , "pipefail" , "-c" ]
# hadolint ignore=DL3008,DL3013
2024-01-18 11:30:27 +00:00
RUN apt-get --yes update \
2022-05-27 15:46:58 +00:00
&& apt-get --yes --no-install-recommends install \
2022-10-04 08:59:39 +00:00
curl \
bind9-dnsutils \
git \
iproute2 \
iputils-ping \
iputils-tracepath \
less \
nano \
netcat-openbsd \
jq \
2023-12-08 11:29:07 +00:00
python3-pip \
2024-01-18 11:30:27 +00:00
wget \
gnupg \
2024-04-18 05:31:29 +00:00
&& pip install --no-cache-dir six \
&& wget -O - -q https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/postgresql.gpg > /dev/null \
2024-01-18 11:30:27 +00:00
&& echo deb [ arch = amd64,arm64,ppc64el signed-by= /usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main | tee /etc/apt/sources.list.d/postgresql.list \
&& apt-get --yes update \
&& apt-get --yes --no-install-recommends install postgresql-client-15 \
2022-05-27 15:46:58 +00:00
&& apt-get clean \
2024-01-18 11:30:27 +00:00
&& rm -rf /var/lib/apt/lists/*
2022-05-27 15:46:58 +00:00
# step-cli
ARG STEP_VERSION
ARG TARGETARCH
2023-04-25 14:44:23 +00:00
RUN wget -nv -O step-cli.deb " https://dl.step.sm/gh-release/cli/gh-release-header/v ${ STEP_VERSION } /step-cli_ ${ STEP_VERSION } _ ${ TARGETARCH } .deb " \
2022-05-27 15:46:58 +00:00
&& dpkg -i step-cli.deb \
&& rm -vf step-cli.deb
# thrift
ARG THRIFT_VERSION
ARG TARGETARCH
RUN wget -nv -O- " https://github.com/valitydev/thrift/releases/download/ ${ THRIFT_VERSION } /thrift- ${ THRIFT_VERSION } -linux- ${ TARGETARCH } .tar.gz " \
| tar -xvz -C /usr/local/bin/
# woorl
ARG WOORL_VERSION
RUN wget -nv -O- " https://github.com/valitydev/woorl/releases/download/ ${ WOORL_VERSION } /woorl- ${ WOORL_VERSION } .tar.gz " \
| tar -xvz -C /usr/local/bin/ \
&& ln -sf woorl /usr/local/bin/woorl-json
COPY ./scripts /opt/holmes/scripts
COPY --from= builder /repos /opt/holmes/
COPY --from= builder /holmes/lib/scripts /opt/holmes/scripts
COPY woorlrc.sample /opt/holmes/
WORKDIR /opt/holmes
ENV CHARSET = UTF-8
ENV LANG = C.UTF-8
CMD [ "/usr/local/bin/epmd" ]