Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed up building docker image #529

Merged
merged 1 commit into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ deptools
sharness/lib/sharness
sharness/test-results
sharness/trash*
vendor/

raftFolderFromTest*
peerstore
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ./...
Expand Down