mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-13 07:01:32 +08:00

* Adding multi arch support for amd64 and arm64 Signed-off-by: rajdas98 <mail.rajdas@gmail.com> * test * reset package-lock.json Signed-off-by: rajdas98 <mail.rajdas@gmail.com> * reset yarn-lock.json Signed-off-by: rajdas98 <mail.rajdas@gmail.com> * reset yarn-lock.json Signed-off-by: rajdas98 <mail.rajdas@gmail.com>
36 lines
911 B
Docker
36 lines
911 B
Docker
FROM golang:1.14-buster AS builder
|
|
|
|
# Add Maintainer Info
|
|
LABEL maintainer="signoz"
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
ENV CGO_ENABLED=0
|
|
ENV GOPATH=/go
|
|
|
|
RUN export GOOS=$(echo ${TARGETPLATFORM} | cut -d / -f1) && \
|
|
export GOARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2)
|
|
|
|
# Prepare and enter src directory
|
|
WORKDIR /go/src/github.com/signoz/signoz/pkg/processors/flattener
|
|
|
|
# Cache dependencies
|
|
ADD go.mod .
|
|
ADD go.sum .
|
|
RUN go mod download -x
|
|
|
|
# Add the sources and proceed with build
|
|
ADD . .
|
|
RUN go build -o ./bin/flattener ./main.go
|
|
RUN chmod +x ./bin/flattener
|
|
|
|
# use a minimal alpine image
|
|
FROM alpine:3.7
|
|
# add ca-certificates in case you need them
|
|
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
|
|
# set working directory
|
|
WORKDIR /root
|
|
# copy the binary from builder
|
|
COPY --from=builder /go/src/github.com/signoz/signoz/pkg/processors/flattener/bin/flattener .
|
|
# run the binary
|
|
CMD ["./flattener"] |