@serverless/docker-image

0.3.0 • Public • Published

docker-image

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
  2. Create
  3. Configure
  4. Deploy

 

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-image'
  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.

Readme

Keywords

none

Package Sidebar

Install

npm i @serverless/docker-image

Weekly Downloads

3

Version

0.3.0

License

Apache

Unpacked Size

7.57 kB

Total Files

8

Last publish

Collaborators

  • ac360
  • serverless-main