diff --git a/docker-images/unlynx/Dockerfile b/docker-images/unlynx/Dockerfile index c6da6cb..b8d438b 100644 --- a/docker-images/unlynx/Dockerfile +++ b/docker-images/unlynx/Dockerfile @@ -1,39 +1,40 @@ FROM golang:1.9 # build time environment variables -ENV UNLYNX_REPO="github.com/lca1/unlynx" \ - UNLYNX_VERSION="MedCo_v0.1" \ +ENV UNLYNX_REPO="github.com/lca1/medco" \ + UNLYNX_VERSION="master" \ MEDCO_CONF_DIR="/medco-configuration" # get maximum of dependencies and cache them RUN go get -v -d gopkg.in/dedis/onet.v1/... && \ go get -v -d gopkg.in/dedis/crypto.v0/... && \ go get -v -d gopkg.in/urfave/cli.v1/... && \ go get -v -d github.com/Knetic/govaluate/... && \ go get -v -d github.com/btcsuite/goleveldb/... && \ go get -v -d github.com/r0fls/gostats/... && \ go get -v -d github.com/fanliao/go-concurrentMap/... && \ - go get -v -d github.com/lib/pq/... + go get -v -d github.com/lib/pq/... && \ + go get -v -d github.com/lca1/unlynx/... # get sources and switch branch WORKDIR /go/src/$UNLYNX_REPO RUN git clone --depth 1 --branch $UNLYNX_VERSION https://$UNLYNX_REPO.git . # get remaining dependencies, compile and install unlynxMedCo binary WORKDIR app RUN go get -v -d ./... && \ go install -v ./... # add script that copies the binary in the configuration folder COPY copy-unlynx-binary.sh docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/copy-unlynx-binary.sh /usr/local/bin/docker-entrypoint.sh # run time environment variables ENV NODE_IDX="0" \ UNLYNX_DEBUG_LEVEL="1" \ UNLYNX_BIN_EXPORT_PATH="$MEDCO_CONF_DIR/unlynxMedCo" EXPOSE 2000 2001 VOLUME "$MEDCO_CONF_DIR" WORKDIR "$MEDCO_CONF_DIR" ENTRYPOINT docker-entrypoint.sh diff --git a/docker-images/unlynx/copy-unlynx-binary.sh b/docker-images/unlynx/copy-unlynx-binary.sh index 1a3bf40..dbde1e2 100644 --- a/docker-images/unlynx/copy-unlynx-binary.sh +++ b/docker-images/unlynx/copy-unlynx-binary.sh @@ -1,7 +1,7 @@ #!/bin/bash set -Eeuo pipefail # copy unlynx binary in the configuration folder (environment variables are available) rm -f $UNLYNX_BIN_EXPORT_PATH -cp -a /go/bin/unlynxMedCo $UNLYNX_BIN_EXPORT_PATH +cp -a /go/bin/medco $UNLYNX_BIN_EXPORT_PATH chmod 777 $UNLYNX_BIN_EXPORT_PATH