Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

docker container build with redis_exporter #127

Merged
merged 1 commit into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,15 @@ kubetools:







redis_exporter:
<<: *docker_build
variables:
CONTAINER_IMAGE: $CI_JOB_NAME
CONTAINER_TAG: latest
DOCKERFILE_DIR: $CI_JOB_NAME
only:
variables:
- $DOCKERIMAGE == $CI_JOB_NAME


# vim: expandtab sts=2
19 changes: 19 additions & 0 deletions dockerfiles/redis_exporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM golang:1.13-alpine as builder

RUN apk --no-cache add ca-certificates git

RUN go get github.com/oliver006/redis_exporter
RUN cd $GOPATH/src/github.com/oliver006/redis_exporter && go build


FROM alpine as alpine
COPY --from=builder /go/src/github.com/oliver006/redis_exporter/redis_exporter /redis_exporter
COPY --from=builder /etc/ssl/certs /etc/ssl/certs

# Run as non-root user for secure environments
USER 59000:59000

EXPOSE 9121
ENTRYPOINT [ "/redis_exporter" ]


4 changes: 4 additions & 0 deletions dockerfiles/redis_exporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# redis exporter

build docker image from https://github.com/oliver006/redis_exporter