Frequently Asked Questions About FDK Base Images and Linux

Find answers to commonly asked questions about the Function Development Kits (FDKs) used by OCI Functions, and the base images on which they are built.

What are the Supported FDK Base Images?

From December 15, 2021, the following FDK base images are supported:

FDK Language Language Version FDK Base Image Name/Tag/Version Base Image OS
Java 11

Build-time base image: fnproject/fn-java-fdk-build:jdk11-1.0.143 (or later)

Runtime base image: fnproject/fn-java-fdk:jre11-1.0.143 (or later)

Oracle Linux 8 slim
Java 8

Build-time base image: fnproject/fn-java-fdk-build:1.0.143 (or later)

Runtime base image: fnproject/fn-java-fdk:1.0.143 (or later)

Oracle Linux 8 slim
Python 3.8

Build-time base image: fnproject/python:3.8-dev

Runtime base image: fnproject/python:3.8

Oracle Linux 8 slim
Python 3.7

Build-time base image: fnproject/python:3.7-dev

Runtime base image: fnproject/python:3.7

Debian
Python 3.6

Build-time base image: fnproject/python:3.6-dev

Runtime base image: fnproject/python:3.6

Oracle Linux 8 slim
Ruby 2.7

Build-time base image: fnproject/ruby:2.7-dev

Runtime base image: fnproject/ruby:2.7

Oracle Linux 8 slim
Go 1.15

Build-time base image: fnproject/go:1.15-dev

Runtime base image: fnproject/go:1.15

Oracle Linux 8 slim
Node.js 14

Build-time base image: fnproject/node:14-dev

Runtime base image: fnproject/node:14

Oracle Linux 8 slim

What does it mean to deprecate the Alpine/Debian FDK base images?

From December 15, 2021, the Alpine/Debian FDK base images are deprecated, which means that:

  • No further updates to the Alpine/Debian FDK base images are planned.
  • Twelve months after December 15, 2021 (that is, from December 15, 2022), the Alpine/Debian FDK base images will no longer be available.

My functions still require the Alpine and Debian Linux distributions. Is there a temporary workaround?

From December 15, 2021, Oracle strongly recommends you use the appropriate Oracle Linux 8 slim FDK base images for the languages and language versions in which your functions are written.

If you cannot immediately start using the Oracle Linux 8 slim FDK base images because you have functions that still require the Alpine or Debian Linux distributions, there is a temporary workaround. For a limited time, the Alpine/Debian FDK base images remain available but with modified image tags. You can update custom Dockerfiles to use the deprecated Alpine/Debian FDK base images instead of the Oracle Linux 8 slim FDK base images by explicitly specifying the modified image tags. See How do I specify deprecated Alpine/Debian FDK base images in custom Dockerfiles after December 15, 2021? for the list of modified image tags.

For example, consider the following custom Dockerfile for a Python function, which specifies fnproject/python:3.6-dev and fnproject/python:3.6 as the FDK build-time and runtime base images respectively:

FROM fnproject/python:3.6-dev as build-stage
WORKDIR /function
ADD requirements.txt /function/
RUN pip3 install --target /python/  --no-cache --no-cache-dir -r requirements.txt &&\
     rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
ADD . /function/
RUN rm -fr /function/.pip_cache

FROM fnproject/python:3.6
RUN apt-get update && apt-get install -y imagemagick
WORKDIR /function
COPY --from=build-stage /function /function
COPY --from=build-stage /python /python
ENV PYTHONPATH=/python
ENTRYPOINT ["/python/bin/fdk", "/function/func.py", "handler"]

Before December 15, 2021, this custom Dockerfile uses the Debian FDK build-time and runtime base images. After December 15, 2021, it uses the Oracle Linux 8 slim FDK build-time and runtime base images.

To use the deprecated Debian FDK build-time and runtime base images after December 15, 2021, you must explicitly specify the names of the deprecated Debian FDK build-time and runtime base images in the custom Dockerfile (fnproject/python:3.6-debian-dev and fnproject/python:3.6-debian), as shown below:

FROM fnproject/python:3.6-debian-dev as build-stage
WORKDIR /function
ADD requirements.txt /function/
RUN pip3 install --target /python/  --no-cache --no-cache-dir -r requirements.txt &&\
     rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
ADD . /function/
RUN rm -fr /function/.pip_cache

FROM fnproject/python:3.6-debian
RUN apt-get update && apt-get install -y imagemagick
WORKDIR /function
COPY --from=build-stage /function /function
COPY --from=build-stage /python /python
ENV PYTHONPATH=/python
ENTRYPOINT ["/python/bin/fdk", "/function/func.py", "handler"]

How do I specify deprecated Alpine/Debian FDK base images in custom Dockerfiles after December 15, 2021?

From December 15, 2021, use the following FDK base image names in custom Dockerfiles to specify deprecated Alpine/Debian FDK build-time and runtime base images:

FDK Language Language Version FDK Base Image Name/Tag/Version Base Image OS
Java 11
Build-time base image (either of the following):
  • fnproject/fn-java-fdk-build:jdk11-latest-debian
  • fnproject/fn-java-fdk-build:jdk11-1.0.142 (or earlier)
Runtime base image (either of the following):
  • fnproject/fn-java-fdk:jre11-latest-debian
  • fnproject/fn-java-fdk:jre11-1.0.142 (or earlier)
Debian
Java 8
Build-time base image (either of the following):
  • fnproject/fn-java-fdk-build:latest-debian
  • fnproject/fn-java-fdk-build:1.0.142 (or earlier)
Runtime base image (either of the following):
  • fnproject/fn-java-fdk:latest-debian
  • fnproject/fn-java-fdk:1.0.142 (or earlier)
Debian
Python 3.8

Build-time base image: fnproject/python:3.8-debian-dev

Runtime base image: fnproject/python:3.8-debian

Debian
Python 3.6

Build-time base image: fnproject/python:3.6-debian-dev

Runtime base image: fnproject/python:3.6-debian

Debian
Ruby 2.7

Build-time base image: fnproject/ruby/2.7-alpine-dev

Runtime base image: fnproject/ruby:2.7-alpine

Alpine
Go 1.15

Build-time base image: fnproject/go:1.15-alpine-dev

Runtime base image: fnproject/go:1.15-alpine

Alpine
Node.js 14

Build-time base image: fnproject/node:14-alpine-dev

Runtime base image: fnproject/node:14-alpine

Alpine

How do I change a custom Dockerfile to use an Oracle Linux 8 slim FDK base image after December 15, 2021?

From December 15, 2021, Oracle strongly recommends you use the appropriate Oracle Linux 8 slim FDK base images for the languages and language versions in which your functions are written. From December 15, 2021, the Alpine/Debian FDK base images are deprecated (with the exception of the Debian FDK base images for Python 3.7).

Prior to December 15, 2021, you might have created a custom Dockerfile for a function that used one of the deprecated Alpine/Debian FDK base images. For example, by modifying the Dockerfile that OCI Functions creates, and setting runtime: docker in the function's func.yaml file. From December 15, 2021, the function might now build and deploy with errors such as missing apt-get .... The errors occur if the custom Dockerfile includes Alpine/Debian package manager commands. In this case, replace the Alpine/Debian package manager commands with Oracle Linux 8 slim package manager commands.

For example, prior to December 15, 2021, you might have been able to build and deploy a function successfully using the following custom Dockerfile:

FROM fnproject/python:3.6-dev as build-stage
WORKDIR /function
ADD requirements.txt /function/
RUN pip3 install --target /python/  --no-cache --no-cache-dir -r requirements.txt &&\
	rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
ADD . /function/
RUN rm -fr /function/.pip_cache

FROM fnproject/python:3.6
RUN apt-get update && apt-get install -y imagemagick
WORKDIR /function
COPY --from=build-stage /function /function
COPY --from=build-stage /python /python
ENV PYTHONPATH=/python
ENTRYPOINT ["/python/bin/fdk", "/function/func.py", "handler"]

After December 15, 2021, you have to change the custom Dockerfile for the function to build and deploy successfully, as follows:

FROM fnproject/python:3.6-dev as build-stage
WORKDIR /function
ADD requirements.txt /function/

RUN pip3 install --target /python/  --no-cache --no-cache-dir -r requirements.txt &&\
  rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv &&\
  chmod -R o+r /python
ADD . /function/
RUN rm -fr /function/.pip_cache

FROM fnproject/python:3.6
RUN microdnf install oracle-epel-release-el8 &&\
      microdnf install ImageMagick &&\
      microdnf remove oracle-epel-release-el8 &&\
      microdnf clean all
WORKDIR /function
COPY --from=build-stage /python /python
COPY --from=build-stage /function /function
RUN chmod -R o+r /function
ENV PYTHONPATH=/function:/python
ENTRYPOINT ["/python/bin/fdk", "/function/func.py", "handler"]