diff --git a/Makefile b/Makefile index 16a5553..b4dcd0b 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ alpine: generate CGO_ENABLED=1 go build \ -tags "$(BUILDTAGS) static_build" \ ${GO_LDFLAGS_STATIC} -o $@ ./examples/$@/... - @echo "Static container for alpine created at: ./$@" + @echo "Static container for $@ created at: ./$@" .PHONY: busybox busybox: generate @@ -25,7 +25,7 @@ busybox: generate CGO_ENABLED=1 go build \ -tags "$(BUILDTAGS) static_build" \ ${GO_LDFLAGS_STATIC} -o $@ ./examples/$@/... - @echo "Static container for alpine created at: ./$@" + @echo "Static container for $@ created at: ./$@" .PHONY: fmt fmt: ## Verifies all files have men `gofmt`ed diff --git a/container/spec.go b/container/spec.go index a1ee5f8..34ce6b1 100644 --- a/container/spec.go +++ b/container/spec.go @@ -17,6 +17,7 @@ type SpecOpts struct { Rootless bool Readonly bool Terminal bool + Args []string Hooks *specs.Hooks } @@ -50,5 +51,9 @@ func Spec(opts SpecOpts) *specs.Spec { } } + if opts.Args != nil { + spec.Process.Args = opts.Args + } + return spec }