mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-28 22:08:01 +08:00
- Have two Dockerfiles doing essentially the same, but optimized for build time (for tests) and image size (for Docker Hub) - Fetch gx dependencies - Expose port 4002 for utp - Specify go version, currently 1.5.3-r0 - Create ephemeral fs-repo if none is mounted - Have t0300-docker-image actually test IPFS, not just an echo - Make everything a bit less hardcoded - Remove dead shacheck License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
40 lines
931 B
Makefile
40 lines
931 B
Makefile
RANDOMSRC = ../../Godeps/_workspace/src/github.com/jbenet/go-random
|
|
IMAGE_NAME = ipfs-test-latest
|
|
IPFS_ROOT = ../..
|
|
|
|
test: clean setup
|
|
./run-test-on-img.sh $(IMAGE_NAME)
|
|
|
|
setup: docker_ipfs_image data/filetiny data/filerand
|
|
|
|
save_logs:
|
|
sh bin/save_logs.sh
|
|
|
|
save_profiling_data:
|
|
sh bin/save_profiling_data.sh
|
|
|
|
data/filetiny: Makefile
|
|
cp Makefile ./data/filetiny # simple
|
|
|
|
data/filerand: bin/random
|
|
./bin/random 50000000 > ./data/filerand
|
|
|
|
bin/random: $(RANDOMSRC)/**/*.go
|
|
go build -o ./bin/random $(RANDOMSRC)/random
|
|
|
|
# just build it every time... this part isn't
|
|
# even the lengthy part, and it decreases pain.
|
|
docker_ipfs_image:
|
|
docker build -t $(IMAGE_NAME) -f test/Dockerfile .
|
|
docker images | grep $(IMAGE_NAME)
|
|
|
|
clean:
|
|
sh bin/clean.sh
|
|
fig stop
|
|
fig rm -v --force
|
|
rm -f bin/random
|
|
rm -f data/filetiny
|
|
rm -f data/filerand
|
|
rm -rf build/*
|
|
docker rmi $(docker images | grep "^<none>" | awk "{print \$3}") -f || true
|