This tutorial walks through how to use a custom Docker image to define an Fn function. Although Fn functions are packaged as Docker images, when developing functions using the Fn CLI developers are not directly exposed to the underlying Docker platform. Docker isn’t hidden (you can see Docker build output and image names and tags in routes), but you aren’t required to be very Docker-savvy to develop functions with Fn. However, sometimes you need to handle advanced use cases and must take complete control of the creation of the function image. Fortunately the design and implementation of Fn enables you to do exactly that. Let’s build a simple custom function image to walk through the process.
As you make your way through this tutorial, look out for this icon. Whenever you see it, it’s time for you to perform an action.
This tutorial requires you to have both Docker and Fn installed. If you need help with Fn installation you can find instructions in the Install and Start Fn Tutorial.
Before we can get starting there are a couple of configuration steps to take care of.
To make it possible to push images you need to authenticate yourself with your Docker repository (default is Docker Hub).
NOTE: Depending on how you’ve installed Docker you may need to prefix
docker commands with
Next, if it isn’t already running, you’ll need to start the Fn server. We’ll run it in the foreground to let us see the server log messages so let’s open a new terminal for this.
1. Define the FN_REGISTRY environment variable to point the Fn server to where it should pull function images from. If using the default Docker Hub registry you just need to specify your docker user id: Read the complete article here
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.