Merge pull request #529 from ipfs/feat/docker-gx-make

speed up building docker image
This commit is contained in:
Hector Sanjuan 2018-09-24 13:51:26 +02:00 committed by GitHub
commit e751fbe25e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ deptools
sharness/lib/sharness
sharness/test-results
sharness/trash*
vendor/
raftFolderFromTest*
peerstore

View File

@ -8,7 +8,7 @@ ENV SRC_PATH $GOPATH/src/github.com/ipfs/ipfs-cluster
COPY . $SRC_PATH
WORKDIR $SRC_PATH
RUN make install
RUN make docker_install
ENV SUEXEC_VERSION v0.2
ENV TINI_VERSION v0.16.1

View File

@ -28,6 +28,10 @@ install: deps
$(MAKE) -C ipfs-cluster-service install
$(MAKE) -C ipfs-cluster-ctl install
docker_install: docker_deps
$(MAKE) -C ipfs-cluster-service install
$(MAKE) -C ipfs-cluster-ctl install
build: deps
go build -ldflags "-X ipfscluster.Commit=$(shell git rev-parse HEAD)"
$(MAKE) -C ipfs-cluster-service build
@ -64,6 +68,13 @@ deps: gx
$(gx_bin) install --global
$(gx-go_bin) rewrite
# Run this target before building the docker image
# and then gx won't attempt to pull all deps
# from the network each time
docker_deps: gx
$(gx_bin) install --local
$(gx-go_bin) rewrite
check:
go vet ./...
golint -set_exit_status -min_confidence 0.3 ./...