-
Notifications
You must be signed in to change notification settings - Fork 163
/
Dockerfile.debug
34 lines (24 loc) · 1.23 KB
/
Dockerfile.debug
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
ARG GO_VERSION=1.16
FROM golang:${GO_VERSION}-alpine3.12 AS builder
# set up nsswitch.conf for Go's "netgo" implementation
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-424546457
RUN echo 'hosts: files dns' > /etc/nsswitch.conf.build
RUN apk add --update --no-cache bash ca-certificates make curl git mercurial tzdata
RUN go get -d github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator
RUN cd $GOPATH/src/github.com/kubernetes-sigs/aws-iam-authenticator && \
git checkout 981ecbe && \
go install ./cmd/aws-iam-authenticator
RUN go get github.com/derekparker/delve/cmd/dlv
FROM alpine:3.13
RUN apk add --update --no-cache bash curl libc6-compat
COPY --from=builder /etc/nsswitch.conf.build /etc/nsswitch.conf
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/bin/aws-iam-authenticator /usr/bin/
COPY --from=builder /go/bin/dlv /
COPY build/debug/pipeline /
COPY build/debug/worker /
COPY build/debug/pipelinectl /
COPY templates /templates
COPY config/anchore/policies/ /policies/
ENTRYPOINT ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--log", "exec", "/pipeline-debug"]