-
Notifications
You must be signed in to change notification settings - Fork 33
Implement local RIC running #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| FROM public.ecr.aws/lambda/ruby:3.3.2025.08.26.15 | ||
|
|
||
| # Copy source code and build gem in container | ||
| COPY . ${LAMBDA_TASK_ROOT}/ | ||
| WORKDIR ${LAMBDA_TASK_ROOT} | ||
|
|
||
| # Uninstall any existing RIC gem for a clean start | ||
| RUN gem uninstall -x aws_lambda_ric || true | ||
|
|
||
| # Build and install the RIC gem | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we uninstall the previous gem just to be sure we're starting from a clean state? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right, it's a good practice |
||
| RUN gem install bundler && \ | ||
| bundle install && \ | ||
| rake build && \ | ||
| gem install pkg/aws_lambda_ric-*.gem | ||
|
|
||
| # Copy handler to task root | ||
| COPY test/integration/test-handlers/echo/app.rb ${LAMBDA_TASK_ROOT}/ | ||
|
|
||
| CMD ["app.App::Handler.process"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/bin/bash | ||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" | ||
|
|
||
|
|
||
| IMAGE_TAG="ruby-ric-rie-test" | ||
| HANDLER="${1:-app.App::Handler.process}" | ||
|
|
||
| echo "Starting RIE test setup for Ruby..." | ||
|
|
||
| echo "Building test Docker image..." | ||
| docker build -t "$IMAGE_TAG" -f "$PROJECT_ROOT/Dockerfile.rie" "$PROJECT_ROOT" | ||
|
|
||
| echo "Starting test container on port 9000..." | ||
| echo "" | ||
| echo "In another terminal, invoke with:" | ||
| echo "curl -s -X POST -H 'Content-Type: application/json' \"http://localhost:9000/2015-03-31/functions/function/invocations\" -d '{\"message\":\"test\"}'" | ||
| echo "" | ||
|
|
||
| exec docker run -it -p 9000:8080 -e _HANDLER="$HANDLER" "$IMAGE_TAG" |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use
public.ecr.aws/lambda/ruby:3.3as this tag will be overiden every time we will release a new image for 3.3.