Docker image containing NodeJS, Serverless Framework and Yarn.
If you want to build and use your own local image
# build image locally
$ make build
# go inside the container
$ make shell
example/apigw
is an example on how to use amaysim/serverless
.
To update the Docker image after making changes/fixes follow the common steps below. The steps for updating the Serverless Framework and Node can be combined.
- Change
SERVERLESS_VERSION
ofMakefile
- Change version of docker-serverless in
example/apigw/docker-compose
- Follow common steps
- Run
docker pull node:lts-alpine
- Follow common steps
- Build and test locally (test also the apigw example)
- Commit and push the changes
- Tag the commit with the command
$ make tag
- Go to hub.docker.com
- In
Build Details
tab, you should now see the new tag kicking off
The Docker image has the following:
- Node LTS (12.14.0) Alpine: we leverage Babel to be compatible with AWS Lambda runtime
- Serverless Framework
- yarn
- zip: handy to zip your own serverless artifact
- AWS CLI: required by some Serverless plug-ins to work