@serverless/docker
v0.1.0
Published
Instantly build and push your Docker images with [Serverless Components](https://github.com/serverless/components). Supports the configuration of the Docker Daemon as well as the Container Registry.
Downloads
5
Readme
docker
Instantly build and push your Docker images with Serverless Components. Supports the configuration of the Docker Daemon as well as the Container Registry.
1. Install
$ npm install -g serverless
2. Create
Just create a serverless.yml
file
$ touch serverless.yml
# .env
DOCKER_USERNAME=XXX
DOCKER_PASSWORD=XXX
3. Configure
# serverless.yml
myImage:
component: '@serverless/docker'
inputs:
dockerHost: '192.168.2.1' # default is `'127.0.0.1'`
dockerPort: 4711 # default is `3000`
dockerfile: my-app.dockerfile # default is `Dockerfile`
context: '.' # default is `process.cwd()`
registryAddress: 'https://container-registry.acme.com' # default is `'https://index.docker.io/v1'`
push: true # default is `false`
repository: acme/my-image
tag: latest
4. Deploy
$ serverless
New to Components?
Checkout the Serverless Components repo for more information.