Discover Packages
github.com/composit/kubernetes
contrib
go2docker
command
Version:
v0.14.2
Opens a new window with list of versions in this module.
Published: Apr 8, 2015
License: Apache-2.0
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
go2docker
Description
go2docker is a command line tool to create minimal docker images from
SCRATCH for go packages.
It is based on the Docker Image Specification v1.0.0 .
Usage
go2docker [-image NAMESPACE/BASENAME] [PACKAGES]
Options
image: namespace/name for the repository, default to go2docker/$(basename)
Examples
$ go get -d github.com/golang/example/hello
$ go2docker -image golang/hello github.com/golang/example/hello | docker load
$ docker images | grep hello
golang/hello latest e96b9f048cdf 2 seconds ago 1.477 MB
$ docker run golang/hello
Hello, Go examples!
TODOs
add command line flag for entrypoint
add command line flag for exposed port
add command line flag for volume
go get the package if not present in $GOPATH
add push command
test more complicated package (ex: etcd)
fix permission inside the tar
Expand ▾
Collapse ▴
Documentation
¶
The go2docker command compiles a go main package and forge a minimal
docker image from the resulting static binary.
usage: go2docker [-image namespace/basename] go/pkg/path | docker load
Source Files
¶
Click to show internal directories.
Click to hide internal directories.