docker-lambda
Advanced tools
+1
-2
@@ -23,3 +23,3 @@ var spawnSync = require('child_process').spawnSync | ||
| options = options || {} | ||
| var dockerImage = options.dockerImage || 'lambci/lambda' | ||
| var dockerImage = options.dockerImage || 'lambci/lambda:nodejs4.3' | ||
| var handler = options.handler || 'index.handler' | ||
@@ -69,4 +69,3 @@ var event = options.event || {} | ||
| // Lambda function. | ||
| return | ||
| } | ||
| } |
+1
-98
| { | ||
| "name": "docker-lambda", | ||
| "version": "0.15.1", | ||
| "version": "0.15.2", | ||
| "description": "A Docker image and test runner that (very closely) mimics the live AWS Lambda environment", | ||
@@ -20,100 +20,3 @@ "main": "index.js", | ||
| "should": "^8.4.0" | ||
| }, | ||
| "eslintConfig": { | ||
| "extends": "eslint:recommended", | ||
| "env": { | ||
| "node": true | ||
| }, | ||
| "rules": { | ||
| "no-console": 0, | ||
| "no-mixed-requires": 0, | ||
| "no-underscore-dangle": 0, | ||
| "no-shadow": 0, | ||
| "no-use-before-define": [ | ||
| 2, | ||
| "nofunc" | ||
| ], | ||
| "camelcase": [ | ||
| 2, | ||
| { | ||
| "properties": "never" | ||
| } | ||
| ], | ||
| "curly": 0, | ||
| "eqeqeq": 0, | ||
| "new-parens": 0, | ||
| "quotes": [ | ||
| 2, | ||
| "single", | ||
| "avoid-escape" | ||
| ], | ||
| "semi": [ | ||
| 2, | ||
| "never" | ||
| ], | ||
| "strict": 0, | ||
| "no-empty-character-class": 2, | ||
| "no-extra-parens": [ | ||
| 2, | ||
| "functions" | ||
| ], | ||
| "no-floating-decimal": 2, | ||
| "no-lonely-if": 2, | ||
| "no-self-compare": 2, | ||
| "no-throw-literal": 2, | ||
| "no-unused-vars": 2, | ||
| "array-bracket-spacing": [ | ||
| 2, | ||
| "never" | ||
| ], | ||
| "brace-style": [ | ||
| 2, | ||
| "1tbs", | ||
| { | ||
| "allowSingleLine": true | ||
| } | ||
| ], | ||
| "comma-dangle": [ | ||
| 2, | ||
| "always-multiline" | ||
| ], | ||
| "comma-style": [ | ||
| 2, | ||
| "last" | ||
| ], | ||
| "consistent-this": [ | ||
| 2, | ||
| "self" | ||
| ], | ||
| "object-curly-spacing": [ | ||
| 2, | ||
| "never" | ||
| ], | ||
| "operator-assignment": [ | ||
| 2, | ||
| "always" | ||
| ], | ||
| "operator-linebreak": [ | ||
| 2, | ||
| "after" | ||
| ], | ||
| "keyword-spacing": 2, | ||
| "space-before-blocks": [ | ||
| 2, | ||
| "always" | ||
| ], | ||
| "space-before-function-paren": [ | ||
| 2, | ||
| "never" | ||
| ], | ||
| "space-in-parens": [ | ||
| 2, | ||
| "never" | ||
| ], | ||
| "spaced-comment": [ | ||
| 2, | ||
| "always" | ||
| ] | ||
| } | ||
| } | ||
| } |
+14
-20
@@ -18,3 +18,3 @@ docker-lambda | ||
| This project consists of a set of Docker images for each of the supported Lambda runtimes | ||
| (Node.js 0.10, 4.3 and 6.10, Python 2.7 and 3.6, Java 8, .NET Core 2.0, and Go 1.x). | ||
| (Node.js 0.10, 4.3, 6.10 and 8.10, Python 2.7 and 3.6, Java 8, .NET Core 2.0, and Go 1.x). | ||
@@ -38,11 +38,8 @@ There are also a set of build images that include packages like gcc-c++, git, | ||
| ```sh | ||
| # Test an index.handler function from the current directory on Node.js v4.3 | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda | ||
| # Test an index.handler function from the current directory on Node.js v8.10 | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs8.10 | ||
| # If using a function other than index.handler, with a custom event | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda index.myHandler '{"some": "event"}' | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs8.10 index.myHandler '{"some": "event"}' | ||
| # Use the original Node.js v0.10 runtime | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs | ||
| # Use the Node.js v6.10 runtime | ||
@@ -71,7 +68,7 @@ docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs6.10 | ||
| # Run custom commands on the default container | ||
| docker run --rm --entrypoint node lambci/lambda -v | ||
| # Run custom commands | ||
| docker run --rm --entrypoint node lambci/lambda:nodejs8.10 -v | ||
| # For large events you can pipe them into stdin if you set DOCKER_LAMBDA_USE_STDIN (on any runtime) | ||
| echo '{"some": "event"}' | docker run --rm -v "$PWD":/var/task -i -e DOCKER_LAMBDA_USE_STDIN=1 lambci/lambda | ||
| echo '{"some": "event"}' | docker run --rm -v "$PWD":/var/task -i -e DOCKER_LAMBDA_USE_STDIN=1 lambci/lambda:nodejs8.10 | ||
| ``` | ||
@@ -86,7 +83,4 @@ | ||
| # To compile native deps in node_modules (runs `npm rebuild`) | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda:build | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda:build-nodejs8.10 | ||
| # To use a different runtime from the default Node.js v4.3 | ||
| docker run --rm -v "$PWD":/var/task lambci/lambda:build-nodejs6.10 | ||
| # To resolve dependencies on go1.x (working directory is /go/src/handler, will run `dep ensure`) | ||
@@ -100,3 +94,3 @@ docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x | ||
| # Run custom commands on a build container | ||
| docker run --rm lambci/lambda:build aws --version | ||
| docker run --rm lambci/lambda:build-python2.7 aws --version | ||
@@ -125,3 +119,3 @@ # To run an interactive session on a build container | ||
| ```dockerfile | ||
| FROM lambci/lambda:build | ||
| FROM lambci/lambda:build-nodejs8.10 | ||
@@ -189,5 +183,5 @@ ENV AWS_DEFAULT_REGION us-east-1 | ||
| Docker tags (follow the Lambda runtime names): | ||
| - `latest` / `nodejs4.3` | ||
| - `nodejs` | ||
| - `nodejs4.3` | ||
| - `nodejs6.10` | ||
| - `nodejs8.10` | ||
| - `python2.7` | ||
@@ -198,5 +192,5 @@ - `python3.6` | ||
| - `dotnetcore2.0` | ||
| - `build` / `build-nodejs4.3` | ||
| - `build-nodejs` | ||
| - `build-nodejs4.3` | ||
| - `build-nodejs6.10` | ||
| - `build-nodejs8.10` | ||
| - `build-python2.7` | ||
@@ -203,0 +197,0 @@ - `build-python3.6` |
+4
-2
@@ -27,3 +27,3 @@ var should = require('should') | ||
| '--rm', | ||
| 'lambci/lambda', | ||
| 'lambci/lambda:nodejs4.3', | ||
| 'index.handler', | ||
@@ -68,3 +68,5 @@ '{}', | ||
| 'AWS_LAMBDA_EVENT_BODY', | ||
| 'lambci/lambda', | ||
| '-e', | ||
| 'DOCKER_LAMBDA_USE_STDIN', | ||
| 'lambci/lambda:nodejs4.3', | ||
| 'index.handler', | ||
@@ -71,0 +73,0 @@ '{}', |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
173
0.58%2
-33.33%15353
-10.72%239
-2.45%