1d81a1fedc
* First draft of test dockerfile build * Test dockerfile, build works, container runs and cluster tests go through * Removed fifo for output * renaming dockerfile * Adding functionality for test 12 Added scripts and entrypoint mods to the testing docker image to allow for random shut down and startup (both SIGSTOP and SIGINT) of the ipfs-cluster-service. * test docker image ready for tests 12 and 13 * Added cluster daemon respawn to docker image
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
FROM ipfs/go-ipfs:release
|
|
MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
|
|
|
EXPOSE 9094
|
|
EXPOSE 9095
|
|
EXPOSE 9096
|
|
|
|
ENV GOPATH /go
|
|
ENV PATH /go/bin:$PATH
|
|
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
|
|
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
|
|
|
|
VOLUME $IPFS_CLUSTER_PATH
|
|
|
|
COPY . $SRC_PATH
|
|
|
|
RUN apk add --no-cache --virtual cluster-deps make musl-dev go git \
|
|
&& apk add --no-cache jq \
|
|
&& go get -u github.com/whyrusleeping/gx \
|
|
&& go get -u github.com/whyrusleeping/gx-go \
|
|
&& cd $SRC_PATH \
|
|
&& gx install --global \
|
|
&& gx-go rewrite \
|
|
&& go build \
|
|
&& make -C ipfs-cluster-service install \
|
|
&& make -C ipfs-cluster-ctl install \
|
|
&& cp docker/test-entrypoint.sh /usr/local/bin/start-daemons.sh \
|
|
&& cp docker/random-stopper.sh /usr/local/bin/random-stopper.sh \
|
|
&& cp docker/random-killer.sh /usr/local/bin/random-killer.sh \
|
|
&& cp docker/wait-killer-stopper.sh /usr/local/bin/wait-killer-stopper.sh \
|
|
&& cp docker/cluster-restart.sh /usr/local/bin/cluster-restart.sh \
|
|
&& chmod +x /usr/local/bin/start-daemons.sh \
|
|
&& apk del --purge cluster-deps \
|
|
&& cd / && rm -rf /go/src /go/bin/gx /go/bin/gx-go
|
|
|
|
ENTRYPOINT ["/usr/local/bin/start-daemons.sh"]
|
|
|
|
CMD ["$IPFS_CLUSTER_OPTS"]
|