forked from kaorimatz/resque_exporter
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Intellection/release_to_docker_hub
Update release workflow to publish Docker image on Docker Hub
- Loading branch information
Showing
4 changed files
with
72 additions
and
23 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
FROM quay.io/prometheus/golang-builder as builder | ||
FROM ubuntu:24.04 AS builder | ||
|
||
COPY . $GOPATH/src/github.com/Intellection/resque-exporter | ||
WORKDIR $GOPATH/src/github.com/Intellection/resque-exporter | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG TARGETARCH | ||
ARG TARGETOS | ||
|
||
RUN make PREFIX=/ | ||
RUN apt-get update -qq -y && \ | ||
apt-get install --no-install-recommends -qq -y \ | ||
ca-certificates \ | ||
wget && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
FROM quay.io/prometheus/busybox | ||
MAINTAINER Satoshi Matsumoto <[email protected]> | ||
ARG RESQUE_EXPORTER_VERSION | ||
ARG RESQUE_EXPORTER_PKG="resque-exporter-${RESQUE_EXPORTER_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" | ||
RUN cd /tmp/ && \ | ||
wget --progress=dot:giga https://github.com/Intellection/resque-exporter/releases/download/${RESQUE_EXPORTER_VERSION}/${RESQUE_EXPORTER_PKG} && \ | ||
wget --progress=dot:giga https://github.com/Intellection/resque-exporter/releases/download/${RESQUE_EXPORTER_VERSION}/${RESQUE_EXPORTER_PKG}.sha256 && \ | ||
echo "$(cat ${RESQUE_EXPORTER_PKG}.sha256) *${RESQUE_EXPORTER_PKG}" | sha256sum -c - && \ | ||
tar --no-same-owner -xzf ${RESQUE_EXPORTER_PKG} | ||
|
||
COPY --from=builder /resque-exporter /bin/resque-exporter | ||
FROM ubuntu:24.04 | ||
|
||
USER nobody:nogroup | ||
COPY --from=builder /tmp/resque-exporter /bin/resque-exporter | ||
|
||
USER nobody:nogroup | ||
EXPOSE 9447 | ||
ENTRYPOINT ["/bin/resque-exporter"] |