Package init

This commit is contained in:
dogsheng 2019-12-13 15:30:22 +08:00
parent cc944b3a9f
commit 04da0e9cfa
4 changed files with 2 additions and 15 deletions

View File

@ -34,12 +34,12 @@ init:
isulad-tools: $(SOURCES) | $(DEPS_LINK)
@echo "Making isulad-tools..."
${ENV} go build -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/isulad-tools .
${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/isulad-tools .
@echo "Done!"
isulad-hooks: $(SOURCES) | $(DEPS_LINK)
@echo "Making isulad-hooks..."
${ENV} go build -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/isulad-hooks ./hooks/isulad-hooks
${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/isulad-hooks ./hooks/isulad-hooks
@echo "Done!"
localtest:

View File

@ -10,16 +10,6 @@ The project includes two main parts: `isulad-tools` and `hooks`.
`isulad-tools` is used for dynamically operating on running containers,
and `hooks` is used for executing user defined program at some special timepoint of container's lifecycle.
## Compiling
If you have golang environment on your host, you can compile and get binary with:
```
$ make init && make
```
After that, statically built binaries are put in `build` directory.
## Hooks
We provide isulad hooks function.

2
go.mod
View File

@ -1,7 +1,6 @@
module isula.org/isulad-tools
replace (
github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.4.2
golang.org/x/crypto => github.com/golang/crypto v0.0.0-20190701094942-4def268fd1a4
golang.org/x/net => github.com/golang/net v0.0.0-20190813141303-74dc4d7220e7
golang.org/x/sync => github.com/golang/sync v0.0.0-20190423024810-112230192c58
@ -14,7 +13,6 @@ replace (
require (
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/Sirupsen/logrus v0.0.0-00010101000000-000000000000 // indirect
github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/docker/docker v1.13.1

View File

@ -25,7 +25,6 @@ This is isulad tools, to make it work, you need a isulad and util-linux
%setup -q -c -n src/isula.org/isulad-tools
%build
export GOPATH=%_topdir/BUILD
make init && make
%install