Commit 4c21bf4b authored by Ivan Vilata-i-Balaguer's avatar Ivan Vilata-i-Balaguer
Browse files

Merge branch 'docker-wrapper-fixes'

This changes the name of the wrapper script to just ``ouinet`` (since it is
not really dependent on Docker) and makes it executable from whatever
directory.
parents dc0152bc 74672b94
......@@ -35,7 +35,7 @@ RUN apt-get update && apt-get install -y \
WORKDIR /usr/local/src
# This version is a recommendation and this file has been tested to work for it,
# but you may attempt to build other versions by overriding this argument.
ARG OUINET_VERSION=v0.0.4-android
ARG OUINET_VERSION=v0.0.6-docker
RUN git clone --recursive -b "$OUINET_VERSION" https://github.com/equalitie/ouinet.git
WORKDIR /opt/ouinet
RUN cmake /usr/local/src/ouinet \
......@@ -80,7 +80,8 @@ COPY --from=builder /opt/ouinet/modules/ipfs-cache/ipfs_bindings/libipfs_binding
# GNUnet support has been temporarily removed.
#COPY --from=builder /opt/ouinet/modules/gnunet-channels/gnunet-bin/share/gnunet/ modules/gnunet-channels/gnunet-bin/share/gnunet/
#COPY --from=builder /opt/ouinet/modules/gnunet-channels/gnunet-bin/lib/ modules/gnunet-channels/gnunet-bin/lib/
COPY --from=builder /opt/ouinet/injector /opt/ouinet/client /usr/local/src/ouinet/scripts/ouinet-docker.sh ./
COPY --from=builder /opt/ouinet/injector /opt/ouinet/client ./
COPY --from=builder /usr/local/src/ouinet/scripts/ouinet-wrapper.sh ouinet
COPY --from=builder /opt/ouinet/test/test-* test/
COPY --from=builder /usr/local/src/ouinet/repos/ repos/
ENTRYPOINT ["./ouinet-docker.sh"]
COPY --from=builder /usr/local/src/ouinet/repos/ repo-templates/
ENTRYPOINT ["/opt/ouinet/ouinet"]
......@@ -308,7 +308,7 @@ populate its default environment file:
$ cd /path/to/ouinet-injector
$ cp /path/to/docker-compose.yml .
$ echo OUINET_ROLE=injector >> .env
$ echo OUINET_VERSION=v0.0.4-android >> .env
$ echo OUINET_VERSION=v0.0.6-docker >> .env
$ docker-compose up
### Accessing data files
......
#!/bin/sh
# Populate repo and start the injector or client.
# Both program binary and repos templates should be at current directory.
# Both program binary and repos templates should be in the directory
# where this wrapper script resides.
set -e
......@@ -11,13 +12,14 @@ case "$1" in
;;
esac
INST="$(dirname -- "$(readlink -f -- "$0")")"
PROG=$1
CONF=/var/opt/ouinet/$PROG/ouinet-$PROG.conf
REPO=$(dirname $CONF)
if [ ! -d "$REPO" ]; then
cp -r repos/$PROG "$REPO"
cp -r "$INST/repo-templates/$PROG" "$REPO"
fi
exec ./$PROG --repo "$REPO" "$@"
exec "$INST/$PROG" --repo "$REPO" "$@"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment