Easily run Docker from Slack with a /docker command!
Usage:
/docker busybox uname -a
Developed as a demo & example for the IOpipe library, which simplifies the development, sharing, and lifecycle-management of functional, cross-cloud serverless apps.
-
Add the following Docker API authentication files into functions/dockercmd/cfg/: ca.pem, cert.pem, key.pem.
For convenience, we recommend using docker-machine or Rackspace Carina to create these keys. Rackspace Carina is a beta service offering free, out-of-box Docker Swarm clusters with a downloadable zip file containing these keys.
-
Run
npm install
in the directory functions/dockercmd/. -
Edit project.json to specify your AWS Lambda Execution role ARN.
-
Run
apex deploy
or manually deploy on AWS Lambda. (Download Apex) -
Access the portal for Amazon's API Gateway service and click Create API.
-
Click "Import from Swagger", then "Select Swagger File". Choose the swagger.json file at the root of this repository and click Import.
-
Click Actions -> Deploy API and choose Deployment Stage, "[New Stage]" and specify a stage name (i.e. "prod").
-
From the Stage Editor copy the "Invoke URL" from the top of the page.
-
Navigate to Slack's Custom Integrations page.
-
Click Slack Commands.
-
Click Add Configuration.
-
Under, "Choose a Command", specify the slash-command you would like to trigger this plugin. We recommend /docker or /docker-run.
-
Paste the "Invoke URL" from AWS API Gateway into Slack's URL field.
-
Specify Method, GET.
-
Click Save Integration.
Apache 2.0; Copyright 2016, IOpipe, Inc.