diff --git a/README.md b/README.md index d523104..2a54911 100644 --- a/README.md +++ b/README.md @@ -23,16 +23,21 @@ The Ruby Runtime Interface Client package currently supports ruby 3.0 and above. If you're upgrading from 2.x, update your Dockerfile to use the `_HANDLER` environment variable instead of relying on `CMD` arguments. +## Supported Base Operating Systems + +The Ruby Runtime Interface Client supports the following Linux distributions: + +- **Amazon Linux 2023** +- **Alpine** +- **Debian** +- **Ubuntu** + +For Alpine, Debian, and Ubuntu, we support the latest LTS release and the previous LTS release for 6 months after a new LTS version has been released. + ## Usage ### Creating a Docker Image for Lambda with the Runtime Interface Client -First step is to choose the base image to be used. The supported Linux OS distributions are: - - - Amazon Linux 2023 - - Amazon Linux 2 - - Alpine - - Debian - - Ubuntu +First step is to choose the base image to be used. In order to install the Runtime Interface Client, either add this line to your application's Gemfile: @@ -56,30 +61,13 @@ set the `_HANDLER` environment variable to specify the desired handler. Example Dockerfile: ```dockerfile -FROM amazonlinux:latest - -# Define custom function directory -ARG FUNCTION_DIR="/function" - -# Install ruby -RUN dnf install -y ruby3.2 make - -# Install bundler -RUN gem install bundler - -# Install the Runtime Interface Client -RUN gem install aws_lambda_ric - -# Copy function code -RUN mkdir -p ${FUNCTION_DIR} -COPY app.rb ${FUNCTION_DIR} - -WORKDIR ${FUNCTION_DIR} +FROM public.ecr.aws/lambda/ruby:3.4 -# Set the handler via environment variable -ENV _HANDLER="app.App::Handler.process" +# Add your handler definition +ADD test/integration/test-handlers/echo/app.rb . -ENTRYPOINT ["/usr/local/bin/aws_lambda_ric"] +# Specify your handler +CMD ["app.App::Handler.process"] ``` Note that the `ENTRYPOINT` may differ based on the base image used. You can find the correct path by running an