Thursday, July 6, 2017

Build Docker containers from scratch with habitat

StepsCommand/Description
Installationhttps://www.habitat.sh/docs/get-habitat/
CLI Configuration
hab setup
(configure the CLI).
Start with a planhab plan init ruby
Inside the ruby directory$ ls -la ruby /
config/
hooks/
default.toml
plan.sh
plan.shplan.sh is a bash script that describes how to build your package.
Enter the studiohab studio enter
(build and test your Habitat packages).
Build the package build
(Within your studio environment, run).

Export the package as a Docker image

hab pkg export docker (nameoftheorigin)/ruby
Testing the builddocker run --rm --entrypoint=/bin/bash nameoftheorigin/ruby  -c irb


Reference:

No comments:

Post a Comment