@rlyle1179/serverless-aws-batch 1.0.48 → 1.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/docker.js +5 -9
- package/package.json +1 -1
package/lib/docker.js
CHANGED
|
@@ -78,25 +78,21 @@ function buildDockerImage() {
|
|
|
78
78
|
// - Function Timeout and Function Memory are set by Env Variables on the Job Definition
|
|
79
79
|
// - Access Key and Secret are unset to that we use the role on the container that AWS provides
|
|
80
80
|
const dockerFileContents = `
|
|
81
|
-
FROM justinram11/lambda:build
|
|
81
|
+
FROM justinram11/lambda:build-nodejs12.x AS builder
|
|
82
82
|
USER root
|
|
83
83
|
|
|
84
84
|
${additionalRunCommands}
|
|
85
85
|
COPY ${this.serverless.service.service}.zip /tmp
|
|
86
86
|
RUN cd /tmp && unzip -q ${this.serverless.service.service}.zip && rm ${this.serverless.service.service}.zip
|
|
87
87
|
|
|
88
|
-
FROM justinram11/lambda
|
|
88
|
+
FROM justinram11/lambda:nodejs12.x
|
|
89
89
|
COPY --from=builder /tmp /var/task/${this.serverless.service.service}/
|
|
90
90
|
RUN rm -rf /tmp/*
|
|
91
|
+
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash -
|
|
92
|
+
RUN yum install -y nodejs-16.20.0
|
|
91
93
|
WORKDIR /var/task/${this.serverless.service.service}/
|
|
92
94
|
`;
|
|
93
|
-
|
|
94
|
-
if (this.serverless.service.provider.runtime === 'nodejs8.10') dockerFileContents.concat(
|
|
95
|
-
'ENTRYPOINT ["/var/lang/bin/node", "--expose-gc", "--max-semi-space-size=150", "--max-old-space-size=30000", "/var/runtime/node_modules/awslambda/index.js"]\n'
|
|
96
|
-
);
|
|
97
|
-
if (this.serverless.service.provider.runtime === 'nodejs10.x') dockerFileContents.concat(
|
|
98
|
-
'ENV NODE_OPTIONS="--max-old-space-size=30000"\n'
|
|
99
|
-
);
|
|
95
|
+
|
|
100
96
|
const servicePath = this.serverless.config.servicePath || '';
|
|
101
97
|
const packagePath = path.join(servicePath || '.', '.serverless');
|
|
102
98
|
const dockerFile = path.join(packagePath, 'Dockerfile');
|