From 22621ac77f231a5407475645c6eb08a2a142349d Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sat, 3 Dec 2016 23:50:59 -0800 Subject: [PATCH] Add a README intro section --- .gitignore | 1 + README.md | 26 ++++++++++++++++++++++++++ builddir.go | 2 +- examples/world | 1 + main.go | 1 - 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 examples/world diff --git a/.gitignore b/.gitignore index 3b8acec..d469690 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ _testmain.go *.prof tarpoon +*.tar \ No newline at end of file diff --git a/README.md b/README.md index 2c639e2..229aa16 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Docker Build -- Without the Docker +Tarpoon starts with a base image, appends an application's tarball, and pushes the resulting image to a Docker registry. It replaces the need for Docker in Docker or Docker on Docker hackery. + ## Build Install packages for dynamic dependencies. @@ -11,4 +13,28 @@ Install packages for dynamic dependencies. Build using Go 1.7 or higher. + go build -o tarpoon git.barakmich.com/barak/tarpoon + +## Examples + +Create an example app tarball. + + echo "hello" > examples/world + +Tar the application. + + tar czf world.tar examples/world + +Build and push the image. + + ./tarpoon -b //busybox world.tar //docker.io/username/test-image + +Verify the Docker image works contains the contents. + + sudo docker run username/test-image + + + + + diff --git a/builddir.go b/builddir.go index 23b4fc3..469686f 100644 --- a/builddir.go +++ b/builddir.go @@ -89,7 +89,7 @@ func systemContext() *types.SystemContext { return &types.SystemContext{ RegistriesDirPath: "", DockerCertPath: "", - DockerInsecureSkipTLSVerify: !tlsVerify, + DockerInsecureSkipTLSVerify: !tlsVerify } } diff --git a/examples/world b/examples/world new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/examples/world @@ -0,0 +1 @@ +hello diff --git a/main.go b/main.go index b96ecdd..0b76ea6 100644 --- a/main.go +++ b/main.go @@ -75,5 +75,4 @@ func rootRun(cmd *cobra.Command, args []string) { fmt.Println(err) os.Exit(1) } - }