-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create debug docker images for jaeger backends (#2545)
Closes #2493 Signed-off-by: Ashmita Bohara <[email protected]>
- Loading branch information
1 parent
3d99871
commit 9f954fe
Showing
12 changed files
with
208 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
FROM alpine:latest as certs | ||
RUN apk add --update --no-cache ca-certificates | ||
ARG base_image | ||
ARG debug_image | ||
|
||
FROM scratch | ||
FROM $base_image AS release | ||
ARG TARGETARCH=amd64 | ||
ARG USER_UID=10001 | ||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
|
||
EXPOSE 5775/udp 6831/udp 6832/udp 5778 | ||
COPY agent-linux-$TARGETARCH /go/bin/agent-linux | ||
EXPOSE 5775/udp 6831/udp 6832/udp 5778/tcp | ||
ENTRYPOINT ["/go/bin/agent-linux"] | ||
USER ${USER_UID} | ||
|
||
FROM $debug_image AS debug | ||
ARG TARGETARCH=amd64 | ||
ARG USER_UID=10001 | ||
COPY agent-debug-linux-$TARGETARCH /go/bin/agent-linux | ||
EXPOSE 5775/udp 6831/udp 6832/udp 5778/tcp 12345/tcp | ||
ENTRYPOINT ["/go/bin/dlv", "exec", "/go/bin/agent-linux", "--headless", "--listen=:12345", "--api-version=2", "--accept-multiclient", "--log", "--"] | ||
USER ${USER_UID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
FROM alpine:latest as certs | ||
RUN apk add --update --no-cache ca-certificates | ||
ARG base_image | ||
ARG debug_image | ||
|
||
FROM scratch | ||
FROM $base_image AS release | ||
ARG TARGETARCH=amd64 | ||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
|
||
EXPOSE 14250 | ||
COPY collector-linux-$TARGETARCH /go/bin/collector-linux | ||
EXPOSE 14250/tcp | ||
ENTRYPOINT ["/go/bin/collector-linux"] | ||
|
||
FROM $debug_image AS debug | ||
ARG TARGETARCH=amd64 | ||
COPY collector-debug-linux-$TARGETARCH /go/bin/collector-linux | ||
EXPOSE 12345/tcp 14250/tcp | ||
ENTRYPOINT ["/go/bin/dlv", "exec", "/go/bin/collector-linux", "--headless", "--listen=:12345", "--api-version=2", "--accept-multiclient", "--log", "--"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
FROM alpine:latest as certs | ||
RUN apk add --update --no-cache ca-certificates | ||
ARG base_image | ||
ARG debug_image | ||
|
||
FROM scratch | ||
FROM $base_image AS release | ||
ARG TARGETARCH=amd64 | ||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
|
||
EXPOSE 14270 | ||
EXPOSE 14271 | ||
COPY ingester-linux-$TARGETARCH /go/bin/ingester-linux | ||
EXPOSE 14270/tcp 14271/tcp | ||
ENTRYPOINT ["/go/bin/ingester-linux"] | ||
|
||
FROM $debug_image AS debug | ||
ARG TARGETARCH=amd64 | ||
COPY ingester-debug-linux-$TARGETARCH /go/bin/ingester-linux | ||
EXPOSE 12345/tcp 14270/tcp 14271/tcp | ||
ENTRYPOINT ["/go/bin/dlv", "exec", "/go/bin/ingester-linux", "--headless", "--listen=:12345", "--api-version=2", "--accept-multiclient", "--log", "--"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
FROM alpine:latest as certs | ||
RUN apk add --update --no-cache ca-certificates | ||
ARG base_image | ||
ARG debug_image | ||
|
||
FROM scratch | ||
FROM $base_image AS release | ||
ARG TARGETARCH=amd64 | ||
|
||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
|
||
EXPOSE 16686 | ||
COPY query-linux-$TARGETARCH /go/bin/query-linux | ||
|
||
EXPOSE 16686/tcp | ||
ENTRYPOINT ["/go/bin/query-linux"] | ||
|
||
FROM $debug_image AS debug | ||
ARG TARGETARCH=amd64 | ||
COPY query-debug-linux-$TARGETARCH /go/bin/query-linux | ||
EXPOSE 12345/tcp 16686/tcp | ||
ENTRYPOINT ["/go/bin/dlv", "exec", "/go/bin/query-linux", "--headless", "--listen=:12345", "--api-version=2", "--accept-multiclient", "--log", "--"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
VERSION := 1.0.0 | ||
ROOT_IMAGE ?= alpine:3.12 | ||
CERT_IMAGE := alpine:3.12 | ||
GOLANG_IMAGE := golang:1.15-alpine | ||
|
||
BASE_IMAGE := localhost/baseimg:$(VERSION)-$(shell echo $(ROOT_IMAGE) | tr : -) | ||
DEBUG_IMAGE := localhost/debugimg:$(VERSION)-$(shell echo $(GOLANG_IMAGE) | tr : -) | ||
|
||
create-baseimg-debugimg: create-baseimg create-debugimg | ||
|
||
create-baseimg: | ||
docker build -t $(BASE_IMAGE) \ | ||
--build-arg root_image=$(ROOT_IMAGE) \ | ||
--build-arg cert_image=$(CERT_IMAGE) \ | ||
docker/base | ||
|
||
create-debugimg: | ||
docker build -t $(DEBUG_IMAGE) \ | ||
--build-arg golang_image=$(GOLANG_IMAGE) \ | ||
docker/debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ARG cert_image | ||
ARG root_image | ||
|
||
FROM $cert_image AS cert | ||
RUN apk add --update --no-cache ca-certificates | ||
|
||
FROM $root_image | ||
COPY --from=cert /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG golang_image | ||
|
||
FROM $golang_image AS build | ||
ENV GOPATH /go | ||
RUN apk add --update --no-cache ca-certificates make git && \ | ||
go get github.com/go-delve/delve/cmd/dlv && \ | ||
cd /go/src/github.com/go-delve/delve && \ | ||
make install | ||
|
||
FROM $golang_image | ||
COPY --from=build /go/bin/dlv /go/bin/dlv | ||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters