Dive into Serverless Functions
Fn is a cloud agnostic, container native, serverless platform and as such, Fn leverages Docker extensively. In a nutshell, Fn will expose any piece of code as a Serverless function by turning it into a Docker image. All the heavy lifting of making the Docker image, invoking it properly with the right input, etc. is handled by Fn. As an Fn user/function developer, you don’t need to understand Docker and all its underpinning as Fn abstracts Docker away. Leveraging Docker also means that Fn can benefit from Docker’s rich ecosystem and tools.
Dive is a simple tool that allows you to easily explore the different layers of a Docker image. It is a tool that can be very handy for some Fn users, e.g. users who are doing their own init-image, users who want to understand a function’s dependencies, etc.
To explore a functions layers, simply get the function image details using
fn list functions <app> or
fn inspect function <app> <myfunc> and dive into it (
dive <functionImage:tag>); or simply use the wrapper script below (
divefn <app> <function>). That’s it and thanks Alex for Dive!