Page MenuHomec4science

Dockerfile
No OneTemporary

File Metadata

Created
Mon, Mar 3, 05:18

Dockerfile

FROM golang:1.9
# build time environment variables
ENV UNLYNX_REPO="github.com/lca1/unlynx" \
UNLYNX_VERSION="MedCo_v0.1" \
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/...
# 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"
ENV UNLYNX_KEY_FILE_PATH="$MEDCO_CONF_DIR/srv$NODE_IDX-private.toml" \
UNLYNX_DDT_SECRETS_FILE_PATH="$MEDCO_CONF_DIR/srv$NODE_IDX-ddtsecrets.toml"
EXPOSE 2000 2001
VOLUME "$MEDCO_CONF_DIR"
WORKDIR "$MEDCO_CONF_DIR"
ENTRYPOINT docker-entrypoint.sh

Event Timeline