Installing Docker for Use with OCI Functions

Find out how to install Docker for use with OCI Functions.

Before using OCI Functions, a version of Docker supported by Fn Project must be installed in your development environment.

If you are using Cloud Shell as your development environment, a suitable version of Docker has already been installed for you.

If Docker is not already installed, or the installed version of Docker is not supported, you'll have to install or upgrade Docker.

The instructions in this topic assume:

Note

By default, Fn Project (and by extension, OCI Functions) assumes the use of Docker to build and deploy function images. However, Fn Project also supports Podman as an alternative to Docker. See Note on the use of Podman instead of Docker.

To confirm that a supported version of Docker is installed in your development environment:

  1. Log in to your development environment as a functions developer.

  2. In a terminal window, confirm that Docker is installed by entering:

    docker version
  3. Do one of the following, depending on the message you see:

    • If you see an error message indicating that Docker is not installed, you have to install Docker before proceeding to the next step. See the Docker documentation for information about installing Docker on your platform. If your platform is Oracle Linux, see Oracle Container Runtime for Docker User's Guide.
    • If you see a message indicating the version of Docker that's installed, go to the next step.
  4. Assuming Docker is installed, go to the Fn Project home page on GitHub to confirm that the installed version of Docker is at least the minimum version specified in the Pre-requisites section.

    If the installed version of Docker is not supported by Fn Project, you have to upgrade the version of Docker before proceeding. See the Docker documentation for information about upgrading Docker on your platform. If your platform is Oracle Linux, see Oracle Container Runtime for Docker User's Guide.

When you have completed the steps in this topic, go on to Installing the Fn Project CLI.

Note on the use of Podman instead of Docker

By default, Fn Project (and by extension, OCI Functions) assumes the use of Docker to build and deploy function images. However, Fn Project also supports Podman as an alternative to Docker. When using Fn Project CLI version 0.6.12 and above, you can set a configuration setting to specify that you want to use Podman instead of Docker.

Having installed the Fn Project CLI (see Installing the Fn Project CLI), specify that you want to use Podman as follows:

1. Install Podman (version 3.4 or later), and add Podman to the system path. See Podman Installation Instructions

2. Add the container-enginetype configuration setting to the ~/.fn/config.yaml file as follows:

container-enginetype: podman

If you subsequently want to use Docker rather than Podman, do either of the following:

  • Remove the container-enginetype configuration setting from the ~/.fn/config.yaml file.
  • Update the container-enginetype configuration setting in the ~/.fn/config.yaml file to specify docker rather than podman, as follows:
container-enginetype: docker