Skip to content

Commit

Permalink
performing requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dropsignal committed Mar 10, 2024
1 parent 1e74e96 commit 543f376
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
18 changes: 10 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ WORKDIR /go/src/github.com/analogj/scrutiny
COPY --link . /go/src/github.com/analogj/scrutiny
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
file
file \
&& rm -rf /var/lib/apt/lists/*
RUN make binary-clean binary-all WEB_BINARY_NAME=scrutiny


Expand All @@ -40,15 +41,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
curl \
smartmontools \
tzdata \
&& update-ca-certificates
RUN case ${TARGETARCH} in \
"amd64") S6_ARCH=amd64 ;; \
"arm64") S6_ARCH=aarch64 ;; \
esac \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates \
&& case ${TARGETARCH} in \
"amd64") S6_ARCH=amd64 ;; \
"arm64") S6_ARCH=aarch64 ;; \
esac \
&& curl https://github.com/just-containers/s6-overlay/releases/download/v${S6VER}/s6-overlay-${S6_ARCH}.tar.gz -L -s --output /tmp/s6-overlay-${S6_ARCH}.tar.gz \
&& tar xzf /tmp/s6-overlay-${S6_ARCH}.tar.gz -C / \
&& rm -rf /tmp/s6-overlay-${S6_ARCH}.tar.gz
RUN curl -L https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXVER}-${TARGETARCH}.deb --output /tmp/influxdb2-${INFLUXVER}-${TARGETARCH}.deb \
&& rm -rf /tmp/s6-overlay-${S6_ARCH}.tar.gz \
curl -L https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXVER}-${TARGETARCH}.deb --output /tmp/influxdb2-${INFLUXVER}-${TARGETARCH}.deb \
&& ln -s /usr/bin/false /bin/false \
&& ln -s /usr/bin/bash /bin/bash \
&& dpkg -i --force-all /tmp/influxdb2-${INFLUXVER}-${TARGETARCH}.deb \
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.collector
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ WORKDIR /go/src/github.com/analogj/scrutiny

COPY . /go/src/github.com/analogj/scrutiny

RUN apt-get update && apt-get install -y file
RUN apt-get update && apt-get install -y file && rm -rf /var/lib/apt/lists/*
RUN make binary-clean binary-collector

########
FROM debian:bookworm-slim as runtime
WORKDIR /opt/scrutiny
ENV PATH="/opt/scrutiny/bin:${PATH}"

RUN apt-get update && apt-get install -y cron smartmontools ca-certificates tzdata && update-ca-certificates
RUN apt-get update && apt-get install -y cron smartmontools ca-certificates tzdata && rm -rf /var/lib/apt/lists/* && update-ca-certificates

COPY /docker/entrypoint-collector.sh /entrypoint-collector.sh
COPY /rootfs/etc/cron.d/scrutiny /etc/cron.d/scrutiny
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM golang:1.20-bookworm as backendbuild
WORKDIR /go/src/github.com/analogj/scrutiny
COPY --link . /go/src/github.com/analogj/scrutiny

RUN apt-get update && apt-get install -y file
RUN apt-get update && apt-get install -y file && rm -rf /var/lib/apt/lists/*
RUN make binary-clean binary-all WEB_BINARY_NAME=scrutiny


Expand All @@ -26,7 +26,7 @@ EXPOSE 8080
WORKDIR /opt/scrutiny
ENV PATH="/opt/scrutiny/bin:${PATH}"

RUN apt-get update && apt-get install -y ca-certificates curl tzdata && update-ca-certificates
RUN apt-get update && apt-get install -y ca-certificates curl tzdata && rm -rf /var/lib/apt/lists/* && update-ca-certificates

COPY --link --from=backendbuild --chmod=755 /go/src/github.com/analogj/scrutiny/scrutiny /opt/scrutiny/bin/
COPY --link --from=frontendbuild --chmod=644 /go/src/github.com/analogj/scrutiny/dist /opt/scrutiny/web
Expand Down

0 comments on commit 543f376

Please sign in to comment.