rebase to debian 12 (bookworm)

pull/596/head
Drop Signal 10 months ago
parent 5e33c33e75
commit 1e74e96658

@ -12,15 +12,18 @@ RUN make binary-frontend
######## Build the backend ######## Build the backend
FROM golang:1.20-bullseye as backendbuild FROM golang:1.20-bookworm as backendbuild
WORKDIR /go/src/github.com/analogj/scrutiny WORKDIR /go/src/github.com/analogj/scrutiny
COPY --link . /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
RUN make binary-clean binary-all WEB_BINARY_NAME=scrutiny RUN make binary-clean binary-all WEB_BINARY_NAME=scrutiny
######## Combine build artifacts in runtime image ######## Combine build artifacts in runtime image
FROM debian:bullseye-slim as runtime FROM debian:bookworm-slim as runtime
ARG TARGETARCH ARG TARGETARCH
EXPOSE 8080 EXPOSE 8080
WORKDIR /opt/scrutiny WORKDIR /opt/scrutiny
@ -28,6 +31,7 @@ ENV PATH="/opt/scrutiny/bin:${PATH}"
ENV INFLUXD_CONFIG_PATH=/opt/scrutiny/influxdb ENV INFLUXD_CONFIG_PATH=/opt/scrutiny/influxdb
ENV S6VER="1.21.8.0" ENV S6VER="1.21.8.0"
ENV INFLUXVER="2.2.0" ENV INFLUXVER="2.2.0"
SHELL ["/usr/bin/sh", "-c"]
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \ RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
@ -36,17 +40,20 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
curl \ curl \
smartmontools \ smartmontools \
tzdata \ tzdata \
&& update-ca-certificates \ && update-ca-certificates
&& case ${TARGETARCH} in \ RUN case ${TARGETARCH} in \
"amd64") S6_ARCH=amd64 ;; \ "amd64") S6_ARCH=amd64 ;; \
"arm64") S6_ARCH=aarch64 ;; \ "arm64") S6_ARCH=aarch64 ;; \
esac \ 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 \ && 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 / \ && tar xzf /tmp/s6-overlay-${S6_ARCH}.tar.gz -C / \
&& rm -rf /tmp/s6-overlay-${S6_ARCH}.tar.gz \ && 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 \ RUN 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 \ && dpkg -i --force-all /tmp/influxdb2-${INFLUXVER}-${TARGETARCH}.deb \
&& rm -rf /tmp/influxdb2-2.2.0-${TARGETARCH}.deb && rm -f /bin/bash \
&& rm -rf /tmp/influxdb2-${INFLUXVER}-${TARGETARCH}.deb
COPY /rootfs / COPY /rootfs /

@ -4,16 +4,17 @@
######## ########
FROM golang:1.20-bullseye as backendbuild FROM golang:1.20-bookworm as backendbuild
WORKDIR /go/src/github.com/analogj/scrutiny WORKDIR /go/src/github.com/analogj/scrutiny
COPY . /go/src/github.com/analogj/scrutiny COPY . /go/src/github.com/analogj/scrutiny
RUN apt-get update && apt-get install -y file
RUN make binary-clean binary-collector RUN make binary-clean binary-collector
######## ########
FROM debian:bullseye-slim as runtime FROM debian:bookworm-slim as runtime
WORKDIR /opt/scrutiny WORKDIR /opt/scrutiny
ENV PATH="/opt/scrutiny/bin:${PATH}" ENV PATH="/opt/scrutiny/bin:${PATH}"

@ -11,16 +11,17 @@ COPY --link . /go/src/github.com/analogj/scrutiny
RUN make binary-frontend RUN make binary-frontend
######## Build the backend ######## Build the backend
FROM golang:1.20-bullseye as backendbuild FROM golang:1.20-bookworm as backendbuild
WORKDIR /go/src/github.com/analogj/scrutiny WORKDIR /go/src/github.com/analogj/scrutiny
COPY --link . /go/src/github.com/analogj/scrutiny COPY --link . /go/src/github.com/analogj/scrutiny
RUN apt-get update && apt-get install -y file
RUN make binary-clean binary-all WEB_BINARY_NAME=scrutiny RUN make binary-clean binary-all WEB_BINARY_NAME=scrutiny
######## Combine build artifacts in runtime image ######## Combine build artifacts in runtime image
FROM debian:bullseye-slim as runtime FROM debian:bookworm-slim as runtime
EXPOSE 8080 EXPOSE 8080
WORKDIR /opt/scrutiny WORKDIR /opt/scrutiny
ENV PATH="/opt/scrutiny/bin:${PATH}" ENV PATH="/opt/scrutiny/bin:${PATH}"

Loading…
Cancel
Save