1

I've been building python flex templates and would like to test out one in go. Following this tutorial I ran into an error running docker build .

My guess is that there is something simple I'm missing to do with setting up a go package

image

FROM gcr.io/dataflow-templates-base/go-template-launcher-base

ARG WORKDIR=/dataflow/template
RUN mkdir -p ${WORKDIR}

COPY wordcount ${WORKDIR}/wordcount

ENV FLEX_TEMPLATE_GO_BINARY="${WORKDIR}/wordcount"

ENTRYPOINT ["/opt/google/dataflow/go_template_launcher"]

error

 => ERROR [3/3] COPY wordcount /dataflow/template/wordcount                                                            0.0s
------
 > [3/3] COPY wordcount /dataflow/template/wordcount:
------
failed to compute cache key: "/wordcount" not found: not found

tree

.
├── Dockerfile
├── README.md
├── metadata.json
├── wordcount.go
└── wordcount_test.go
willwrighteng
  • 1,411
  • 11
  • 25
  • Does this answer your question? [Docker - failed to compute cache key: not found - runs fine in Visual Studio](https://stackoverflow.com/questions/66146088/docker-failed-to-compute-cache-key-not-found-runs-fine-in-visual-studio) – Max Jun 13 '23 at 18:26
  • Did you tried running ```gcloud auth configure-docker REGION-docker.pkg.dev``` mentioned in the tutorial ? – Nestor Ceniza Jr Jun 13 '23 at 19:14
  • Seems like you need to compile your `wordcount.go` first? – Bruno Volpato Jun 19 '23 at 14:54

0 Answers0