2021-01-03 18:15:44 +05:30
|
|
|
# use a minimal alpine image
|
2023-12-03 07:53:15 +05:30
|
|
|
FROM alpine:3.18.5
|
2022-02-01 23:03:16 +05:30
|
|
|
|
|
|
|
|
# Add Maintainer Info
|
|
|
|
|
LABEL maintainer="signoz"
|
|
|
|
|
|
2023-10-07 21:23:53 +05:45
|
|
|
# define arguments that can be passed during build time
|
|
|
|
|
ARG TARGETOS TARGETARCH
|
|
|
|
|
|
2021-01-03 18:15:44 +05:30
|
|
|
# add ca-certificates in case you need them
|
|
|
|
|
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
|
2022-02-01 23:03:16 +05:30
|
|
|
|
2021-01-03 18:15:44 +05:30
|
|
|
# set working directory
|
|
|
|
|
WORKDIR /root
|
2022-02-01 23:03:16 +05:30
|
|
|
|
2023-10-07 21:23:53 +05:45
|
|
|
# copy the query-service binary
|
|
|
|
|
COPY pkg/query-service/bin/query-service-${TARGETOS}-${TARGETARCH} /root/query-service
|
2021-08-29 10:28:40 +05:30
|
|
|
|
2022-10-06 20:13:30 +05:30
|
|
|
# copy prometheus YAML config
|
|
|
|
|
COPY pkg/query-service/config/prometheus.yml /root/config/prometheus.yml
|
2021-08-29 10:28:40 +05:30
|
|
|
|
2023-08-16 11:20:56 +02:00
|
|
|
# Make query-service executable for non-root users
|
|
|
|
|
RUN chmod 755 /root /root/query-service
|
|
|
|
|
|
2021-01-03 18:15:44 +05:30
|
|
|
# run the binary
|
2021-08-29 10:28:40 +05:30
|
|
|
ENTRYPOINT ["./query-service"]
|
2022-02-01 23:03:16 +05:30
|
|
|
|
2021-08-29 10:28:40 +05:30
|
|
|
CMD ["-config", "/root/config/prometheus.yml"]
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2022-02-01 23:03:16 +05:30
|
|
|
EXPOSE 8080
|