-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
36 lines (20 loc) · 916 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM golang:1.22.6 as build-env
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /jb-sw-realm ./cmd/jb-sw-realm
FROM debian:11-slim
RUN apt-get update && apt-get install -y curl supervisor
WORKDIR /otel
RUN curl -LO https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.77.0/otelcol-contrib_0.77.0_linux_amd64.tar.gz \
&& tar -xzvf otelcol-contrib_0.77.0_linux_amd64.tar.gz \
&& mv otelcol-contrib /usr/local/bin/otelcol-contrib \
&& rm -rf /otel
COPY otel-collector-config.yaml /etc/otelcol-contrib/config.yaml
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY --from=build-env /jb-sw-realm /usr/local/bin/jb-sw-realm
ENV PORT 8080
EXPOSE 8080
HEALTHCHECK CMD curl --fail "http://localhost:8080" || exit 1
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]