Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
identw committed Jul 13, 2024
1 parent 32fe935 commit 9ea7882
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-opts: |
- name: main
- name: ubuntu
# - name: Test
# run: go test ./... -v -covermode=count
22 changes: 22 additions & 0 deletions docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM docker.io/golang:1.22 AS build

WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download

COPY ./main.go ./
COPY ./pkg ./pkg

RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o ./custom-exporter .

FROM docker.io/ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends -y ca-certificates \
&& apt-get autoclean \
&& apt-get --purge autoremove \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /app/custom-exporter /custom-exporter
ENTRYPOINT ["/custom-exporter"]

0 comments on commit 9ea7882

Please sign in to comment.