Skip to content

Commit

Permalink
Move to Docker compose for better reproducability
Browse files Browse the repository at this point in the history
  • Loading branch information
mhart committed Dec 31, 2018
1 parent 5192018 commit b04d5ba
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '2.4'
services:
lambci:
build:
context: ./build/docker
dockerfile: ../../Dockerfile
image: lambci/lambci
# Lambda only has these files/links in /dev:
# /dev/full
# /dev/null
# /dev/random
# /dev/stderr
# /dev/stdin
# /dev/stdout
# /dev/urandom
# /dev/zero
volumes:
- /var/empty:/dev/fd
- /var/empty:/dev/shm
- /var/empty:/dev/mqueue
# - /var/empty:/dev/pts
- /dev/null:/dev/core
- /dev/null:/dev/tty
# - type: tmpfs
# target: /tmp
# tmpfs:
# size: 500M
mem_limit: 3G
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"zip": "rm -rf build/lambda.zip node_modules && npm ci --prod && zip -qyr build/lambda.zip . -x@.lambdaignore",
"package": "npm run zip && sam package --template-file template.yaml --s3-bucket ${S3_BUCKET:-lambci} --s3-prefix ${S3_PREFIX:-package} --output-template-file build/packaged.yaml",
"deploy": "npm run package && sam deploy --stack-name ${STACK:-lambci} --template-file build/packaged.yaml --capabilities CAPABILITY_IAM",
"docker": "npm run zip && cd build && rm -rf docker && unzip lambda.zip -d docker && docker build -t lambci/lambci -f ../Dockerfile docker"
"docker": "npm run zip && rm -rf build/docker && unzip build/lambda.zip -d build/docker && docker-compose build"
},
"dependencies": {
"ansi_up": "^3.0.0",
Expand Down

0 comments on commit b04d5ba

Please sign in to comment.