dockerkubernetesgoogle-cloud-functionsknative

Dockerfile for Google Cloud Functions


I am reading this GitOps-style article on google cloud and I am now wondering how can I substitute the sample python application which they clone from here with a Google Cloud Function (GCF) which is being triggered by Google Cloud Storage (GCS).

This article describes how you can unit test, integration test and system test a GCF and I would like to apply this in the GitOps-style continuous delivery sample. But, for that purpose I would need a specific Dockerfile (I suppose) similar to this one (but related to node.js):

FROM python:3.7-slim
RUN pip install flask
WORKDIR /app
COPY app.py /app/app.py
ENTRYPOINT ["python"]
CMD ["/app/app.py"]

and maybe the yaml file. I would be happy if you could give me some directions. I am quite new to dockers, containers and kubernetes as a whole.

From what I understand, the syntax of the Dockerfile describes your project type and the runtime for it. So, in my case I guess I need to describe Google's runtime for executing cloud functions. I am no sure this is possible?


Solution

  • I cannot understand why you want to do it this way... Isn't cloud function intended to do not care about virtualization, containerization, servers etc.? Seems you want to do something that Google Cloud Functions want to avoid...

    As requested I am attaching this . It's really worth to watch.