From 5e330f005f4cc4bb59544b9c1b4d655cbf376d35 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Tue, 21 Apr 2020 04:16:17 -0400 Subject: [PATCH] Fix examples for debug (#3969) * make debug work for examples/getting-started * make debug work for examples/compose * make debug work for examples/gcb-kaniko * make debug work for examples/generate-pipeline * make debug work for examples/google-cloud-build * make debug work for examples/kaniko * make debug work for examples/microservices * make debug work for examples/profile-patches * make debug work for examples/profiles * make debug work for examples/structure-tests * make debug work for examples/tagging-with-environment-variables --- examples/compose/Dockerfile | 3 +++ examples/gcb-kaniko/Dockerfile | 3 +++ examples/generate-pipeline/Dockerfile | 3 +++ examples/getting-started/Dockerfile | 3 +++ examples/google-cloud-build/Dockerfile | 3 +++ examples/kaniko/Dockerfile | 3 +++ examples/microservices/leeroy-app/Dockerfile | 3 +++ examples/microservices/leeroy-web/Dockerfile | 3 +++ examples/profile-patches/base-service/Dockerfile | 3 +++ examples/profile-patches/hello-service/Dockerfile | 3 +++ examples/profile-patches/world-service/Dockerfile | 3 +++ examples/profiles/hello-service/Dockerfile | 3 +++ examples/profiles/world-service/Dockerfile | 3 +++ examples/structure-tests/Dockerfile | 3 +++ examples/tagging-with-environment-variables/Dockerfile | 3 +++ integration/examples/compose/Dockerfile | 3 +++ integration/examples/gcb-kaniko/Dockerfile | 3 +++ integration/examples/generate-pipeline/Dockerfile | 3 +++ integration/examples/getting-started/Dockerfile | 3 +++ integration/examples/google-cloud-build/Dockerfile | 3 +++ integration/examples/kaniko/Dockerfile | 3 +++ integration/examples/microservices/leeroy-app/Dockerfile | 3 +++ integration/examples/microservices/leeroy-web/Dockerfile | 3 +++ integration/examples/profile-patches/base-service/Dockerfile | 3 +++ integration/examples/profile-patches/hello-service/Dockerfile | 3 +++ integration/examples/profile-patches/world-service/Dockerfile | 3 +++ integration/examples/profiles/hello-service/Dockerfile | 3 +++ integration/examples/profiles/world-service/Dockerfile | 3 +++ integration/examples/structure-tests/Dockerfile | 3 +++ .../examples/tagging-with-environment-variables/Dockerfile | 3 +++ 30 files changed, 90 insertions(+) diff --git a/examples/compose/Dockerfile b/examples/compose/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/compose/Dockerfile +++ b/examples/compose/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/gcb-kaniko/Dockerfile b/examples/gcb-kaniko/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/gcb-kaniko/Dockerfile +++ b/examples/gcb-kaniko/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/generate-pipeline/Dockerfile b/examples/generate-pipeline/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/generate-pipeline/Dockerfile +++ b/examples/generate-pipeline/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/getting-started/Dockerfile b/examples/getting-started/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/getting-started/Dockerfile +++ b/examples/getting-started/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/google-cloud-build/Dockerfile b/examples/google-cloud-build/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/google-cloud-build/Dockerfile +++ b/examples/google-cloud-build/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/kaniko/Dockerfile b/examples/kaniko/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/kaniko/Dockerfile +++ b/examples/kaniko/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/microservices/leeroy-app/Dockerfile b/examples/microservices/leeroy-app/Dockerfile index 123989f5f5b..940c5e989b5 100644 --- a/examples/microservices/leeroy-app/Dockerfile +++ b/examples/microservices/leeroy-app/Dockerfile @@ -3,5 +3,8 @@ COPY app.go . RUN go build -o /app . FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/microservices/leeroy-web/Dockerfile b/examples/microservices/leeroy-web/Dockerfile index 14bded7fdcc..ce5773cc31c 100644 --- a/examples/microservices/leeroy-web/Dockerfile +++ b/examples/microservices/leeroy-web/Dockerfile @@ -3,5 +3,8 @@ COPY web.go . RUN go build -o /web . FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./web"] COPY --from=builder /web . diff --git a/examples/profile-patches/base-service/Dockerfile b/examples/profile-patches/base-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/profile-patches/base-service/Dockerfile +++ b/examples/profile-patches/base-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/profile-patches/hello-service/Dockerfile b/examples/profile-patches/hello-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/profile-patches/hello-service/Dockerfile +++ b/examples/profile-patches/hello-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/profile-patches/world-service/Dockerfile b/examples/profile-patches/world-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/profile-patches/world-service/Dockerfile +++ b/examples/profile-patches/world-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/profiles/hello-service/Dockerfile b/examples/profiles/hello-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/profiles/hello-service/Dockerfile +++ b/examples/profiles/hello-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/profiles/world-service/Dockerfile b/examples/profiles/world-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/profiles/world-service/Dockerfile +++ b/examples/profiles/world-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/structure-tests/Dockerfile b/examples/structure-tests/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/structure-tests/Dockerfile +++ b/examples/structure-tests/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/examples/tagging-with-environment-variables/Dockerfile b/examples/tagging-with-environment-variables/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/examples/tagging-with-environment-variables/Dockerfile +++ b/examples/tagging-with-environment-variables/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/compose/Dockerfile b/integration/examples/compose/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/compose/Dockerfile +++ b/integration/examples/compose/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/gcb-kaniko/Dockerfile b/integration/examples/gcb-kaniko/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/gcb-kaniko/Dockerfile +++ b/integration/examples/gcb-kaniko/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/generate-pipeline/Dockerfile b/integration/examples/generate-pipeline/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/generate-pipeline/Dockerfile +++ b/integration/examples/generate-pipeline/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/getting-started/Dockerfile b/integration/examples/getting-started/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/getting-started/Dockerfile +++ b/integration/examples/getting-started/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/google-cloud-build/Dockerfile b/integration/examples/google-cloud-build/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/google-cloud-build/Dockerfile +++ b/integration/examples/google-cloud-build/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/kaniko/Dockerfile b/integration/examples/kaniko/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/kaniko/Dockerfile +++ b/integration/examples/kaniko/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/microservices/leeroy-app/Dockerfile b/integration/examples/microservices/leeroy-app/Dockerfile index 123989f5f5b..940c5e989b5 100644 --- a/integration/examples/microservices/leeroy-app/Dockerfile +++ b/integration/examples/microservices/leeroy-app/Dockerfile @@ -3,5 +3,8 @@ COPY app.go . RUN go build -o /app . FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/microservices/leeroy-web/Dockerfile b/integration/examples/microservices/leeroy-web/Dockerfile index 14bded7fdcc..ce5773cc31c 100644 --- a/integration/examples/microservices/leeroy-web/Dockerfile +++ b/integration/examples/microservices/leeroy-web/Dockerfile @@ -3,5 +3,8 @@ COPY web.go . RUN go build -o /web . FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./web"] COPY --from=builder /web . diff --git a/integration/examples/profile-patches/base-service/Dockerfile b/integration/examples/profile-patches/base-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/profile-patches/base-service/Dockerfile +++ b/integration/examples/profile-patches/base-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/profile-patches/hello-service/Dockerfile b/integration/examples/profile-patches/hello-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/profile-patches/hello-service/Dockerfile +++ b/integration/examples/profile-patches/hello-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/profile-patches/world-service/Dockerfile b/integration/examples/profile-patches/world-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/profile-patches/world-service/Dockerfile +++ b/integration/examples/profile-patches/world-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/profiles/hello-service/Dockerfile b/integration/examples/profiles/hello-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/profiles/hello-service/Dockerfile +++ b/integration/examples/profiles/hello-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/profiles/world-service/Dockerfile b/integration/examples/profiles/world-service/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/profiles/world-service/Dockerfile +++ b/integration/examples/profiles/world-service/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/structure-tests/Dockerfile b/integration/examples/structure-tests/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/structure-tests/Dockerfile +++ b/integration/examples/structure-tests/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app . diff --git a/integration/examples/tagging-with-environment-variables/Dockerfile b/integration/examples/tagging-with-environment-variables/Dockerfile index d978b541f36..1fc7510fdcd 100644 --- a/integration/examples/tagging-with-environment-variables/Dockerfile +++ b/integration/examples/tagging-with-environment-variables/Dockerfile @@ -3,5 +3,8 @@ COPY main.go . RUN go build -o /app main.go FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single CMD ["./app"] COPY --from=builder /app .