signoz/pkg/query-service/Dockerfile
Prashant Shahi e12aef136a
perf(query-service): 🔨 improve backend build time (#3658)
* perf(query-service): 🔨 improve backend build time

* chore(query-service): 🔧 address comments on image build time

---------

Signed-off-by: Prashant Shahi <prashant@signoz.io>
2023-10-07 21:08:53 +05:30

31 lines
755 B
Docker

# use a minimal alpine image
FROM alpine:3.17
# Add Maintainer Info
LABEL maintainer="signoz"
# define arguments that can be passed during build time
ARG TARGETOS TARGETARCH
# 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 query-service binary
COPY pkg/query-service/bin/query-service-${TARGETOS}-${TARGETARCH} /root/query-service
# copy prometheus YAML config
COPY pkg/query-service/config/prometheus.yml /root/config/prometheus.yml
# Make query-service executable for non-root users
RUN chmod 755 /root /root/query-service
# run the binary
ENTRYPOINT ["./query-service"]
CMD ["-config", "/root/config/prometheus.yml"]
EXPOSE 8080