From 2e13f946117b42319edce7fa0f32f0083ea529d9 Mon Sep 17 00:00:00 2001 From: Lucas <12496191+lucashuy@users.noreply.github.com> Date: Mon, 3 Jun 2024 16:34:33 -0700 Subject: [PATCH] Install dev tools before running bundle in image --- .../{{cookiecutter.project_name}}/hello_world/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruby/hello-img/{{cookiecutter.project_name}}/hello_world/Dockerfile b/ruby/hello-img/{{cookiecutter.project_name}}/hello_world/Dockerfile index 95b925686..60fab9527 100644 --- a/ruby/hello-img/{{cookiecutter.project_name}}/hello_world/Dockerfile +++ b/ruby/hello-img/{{cookiecutter.project_name}}/hello_world/Dockerfile @@ -3,7 +3,12 @@ FROM public.ecr.aws/lambda/ruby:{{ cookiecutter.options[cookiecutter.runtime].ve COPY app.rb Gemfile ./ ENV GEM_HOME=${LAMBDA_TASK_ROOT} + +# Install dev tools so that `bigdecimal` (a dep of httparty) can be installed +RUN yum install gcc make -y RUN bundle install +# Remove the dev tools +RUN yum uninstall gcc make -y # Command can be overwritten by providing a different command in the template directly. CMD ["app.lambda_handler"]