Duffle is a command line tool that allows you to install and manage CNAB bundles. To learn more about about CNAB and duffle, check out the docs.
Getting Started
Ensure you're running the latest version of Go (1.11+) by running $ go version
$ go version
go version go1.11 darwin/amd64
Clone this repo:
$ cd $GOPATH/src/github.com/deislabs/
$ git clone git@github.com:deislabs/duffle.git
$ cd duffle
Vendor dependencies, build the duffle binary and install onto your system:
$ make bootstrap build
$ sudo make install
Run the command to set duffle up on your machine:
$ duffle init
The following new directories will be created:
/Users/janedoe/.duffle
/Users/janedoe/.duffle/logs
/Users/janedoe/.duffle/plugins
/Users/janedoe/.duffle/repositories
/Users/janedoe/.duffle/claims
/Users/janedoe/.duffle/credentials
==> Installing default repositories...
==> repo added in 1.096263107s
Build and install your first bundle:
$ duffle build ./examples/helloworld/
Step 1/5 : FROM alpine:latest
---> 196d12cf6ab1
Step 2/5 : RUN apk add -u bash
---> Using cache
---> 54b3a85c5c2e
Step 3/5 : COPY Dockerfile /cnab/Dockerfile
---> Using cache
---> cd6f4ff8d83d
Step 4/5 : COPY app /cnab/app
---> 38a482447ffd
Step 5/5 : CMD ["/cnab/app/run"]
---> Running in 8b22055f0a37
---> e5c795c2a1f4
Successfully built e5c795c2a1f4
Successfully tagged deislabs/helloworld-cnab:64dfc7c4d825fe87506dbaba6ab038eafe2a486d
==> Successfully built bundle helloworld:0.1.0
Check that it was built:
$ duffle bundle list
NAME VERSION DIGEST SIGNED?
helloworld 0.1.0 b2747e5c36369f4c102f4f879caa94e607e5db7e true