Skip to content

Commit

Permalink
feat: switch to distroless image
Browse files Browse the repository at this point in the history
  • Loading branch information
m-yosefpor committed Oct 21, 2021
1 parent 3ae3bca commit 3047458
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
18 changes: 4 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#build stage
FROM golang:1.17-buster AS builder
FROM golang:1.17 AS builder
RUN mkdir -p /go/src/app
WORKDIR /go/src/app

Expand All @@ -10,19 +10,9 @@ COPY . /go/src/app
RUN go build -ldflags="-w -s" -o health_exporter

#final stage
FROM debian:buster-slim

ENV TZ=UTC \
PATH="/app:${PATH}"

RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

FROM gcr.io/distroless/base
WORKDIR /app

COPY --from=builder /go/src/app/health_exporter /app/health_exporter
ENTRYPOINT /app/health_exporter
LABEL Name=health_exporter Version=1.0.0
CMD ["/app/health_exporter"]
LABEL Name=health_exporter
EXPOSE 9876
4 changes: 2 additions & 2 deletions charts/health-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ home: https://github.com/snapp-cab/health-exporter
sources:
- https://github.com/snapp-cab/health-exporter.git
type: application
version: 0.3.1
appVersion: 1.0.0
version: 0.3.2
appVersion: 0.3.0
5 changes: 3 additions & 2 deletions charts/health-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Default values for health-exporter.
image:
repository: "spc35771/health-exporter"
tag: "latest"
repository: "ghcr.io/snapp-incubator/health-exporter"
# defaults to chart appVersion
tag: ""
replicas: 1
resources:
limits:
Expand Down

0 comments on commit 3047458

Please sign in to comment.