Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-docker-artifacts

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-docker-artifacts

Serverless Docker Artifacts plugin

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-45.13%
Maintainers
1
Weekly downloads
 
Created
Source

Serverless Docker Artifacts plugin

A Serverless 1.x plugin to build your artifacts within docker container.

Installation and Usage

npm install --save serverless-docker-artifacts

Add the plugin to your serverless.yml file and configure:

plugins:
  - serverless-docker-artifacts

custom:
  dockerArtifact:
    path: '.'                        # Defaults to '.'
    dockerfile: Dockerfile-tesseract # Defaults to 'Dockerfile'
    args:                            # Pass args with --build-arg
      TESSERACT_VERSION: 4.0.0
      TESSDATA: "osd eng rus"
    copy: tesseract-standalone       # Not affected by path

  # If you have more than one
  dockerArtifacts:
    - path: build/somelib
      copy: somelib
    - path: build/tool
      copy: tool-portable

Then run sls deploy or sls package as usual.

Extra commands

This plugin defines commands to manufacture and clean artifacts without packaging them:

sls dockart create                # Build all artifacts
SLS_DEBUG="*" sls dockart create  # Same, showing all the process

sls dockart clean        # Delete artifacts
sls dockart clean-docker # Delete docker images and containers

Note that if you are debugging a dockerfile you probaly have lots of dangling images and their containers. These are not removed by sls dockart clean-docker, you need to handle it yourself.

API for your plugins

const dockart = require('serverless-docker-artifacts');

// Create an artifact
dockart.createArtifact({
    path: 'path/to/',
    dockerfile: 'Dockerfile',
    args: {...},
    copy: 'some-dir',
})

// Remove containers and images
dockart.cleanDocker()

Keywords

FAQs

Package last updated on 14 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc