Skip to content

Commit 6a01621

Browse files
Replace deprecated Docker image with AWS base image for Lambda and introduce Ruby 3.2 support (#86)
1 parent fd0bf0e commit 6a01621

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/bundle.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function bundleInstall(){
5555
fs.mkdirSync(this.build_path)
5656
const options = {cwd : this.ruby_layer, encoding : 'utf8'}
5757
if (this.options.use_docker) {
58-
docker_name = 'lambci/lambda:build-'+this.serverless.service.provider.runtime
58+
docker_name = 'public.ecr.aws/sam/build-'+this.serverless.service.provider.runtime+':latest-x86_64'
5959
ps=docker(['version'], options,this.cli)
6060
if (ps.error && ps.error.code === 'ENOENT') {
6161
throw new Error('docker command not found. Please install docker https://www.docker.com/products/docker-desktop');
@@ -71,7 +71,7 @@ function bundleInstall(){
7171
path.join(this.ruby_layer,'Dockerfile'))
7272
buildDocker = true
7373
}else if (this.options.docker_yums || this.options.environment) {
74-
docker_steps =['FROM lambci/lambda:build-'+this.serverless.service.provider.runtime]
74+
docker_steps =['FROM public.ecr.aws/sam/build-'+this.serverless.service.provider.runtime+':latest-x86_64']
7575
if (this.options.docker_yums) {
7676
this.options.docker_yums.forEach(function(package_name) {
7777
docker_steps.push('RUN yum install -y '+package_name)
@@ -165,7 +165,7 @@ function setBundleConfig(version, config){
165165
}
166166

167167

168-
function zipDir(folder_path,targetPath,zipOptions){
168+
function zipDir(folder_path,targetPath,zipOptions){
169169
zip = new JSZip()
170170
return addDirtoZip(zip, folder_path)
171171
.then(() => {
@@ -287,6 +287,6 @@ function bundleGems() {
287287
.then(bundleInstall)
288288
.then(zipBundleFolder)
289289
.then(configureLayer)
290-
}
290+
}
291291

292292
module.exports = { bundleGems, excludePackage };

0 commit comments

Comments
 (0)