File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,14 +28,11 @@ jobs:
2828 with :
2929 submodules : recursive
3030
31- - name : Set up Go
32- uses : actions/setup-go@v4
33- with :
34- go-version-file : go.mod
31+ - name : Set up QEMU
32+ uses : docker/setup-qemu-action@v3
3533
36- - name : Build binary
37- run : |
38- CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o prom2parquet ./cmd/.
34+ - name : Set up Docker Buildx
35+ uses : docker/setup-buildx-action@v3
3936
4037 - name : Log in to Container Registry
4138 if : github.event_name != 'pull_request'
6360 with :
6461 context : .
6562 file : ./images/Dockerfile.prom2parquet
63+ platforms : linux/amd64,linux/arm64
6664 push : ${{ github.event_name != 'pull_request' }}
6765 tags : ${{ steps.meta.outputs.tags }}
6866 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1- FROM golang:1.24-alpine
1+ FROM golang:1.24-alpine AS builder
22
3- RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64
4- RUN chmod +x /usr/local/bin/dumb-init
3+ WORKDIR /build
4+ COPY . .
5+ RUN CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o prom2parquet ./cmd/.
56
6- RUN go install github.com/go-delve/delve/cmd/dlv@ latest
7+ FROM alpine: latest
78
8- COPY prom2parquet /prom2parquet
9+ ARG TARGETARCH
10+ RUN apk add --no-cache wget && \
11+ case ${TARGETARCH} in \
12+ "amd64") DUMB_INIT_ARCH=x86_64 ;; \
13+ "arm64") DUMB_INIT_ARCH=aarch64 ;; \
14+ *) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
15+ esac && \
16+ wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_${DUMB_INIT_ARCH} && \
17+ chmod +x /usr/local/bin/dumb-init && \
18+ apk del wget
19+
20+ COPY --from=builder /build/prom2parquet /prom2parquet
921
1022ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
You can’t perform that action at this time.
0 commit comments