Skip to content
Snippets Groups Projects
Commit 893c25d7 authored by Gilles Filippini's avatar Gilles Filippini
Browse files

build(docker): WORKDIR = Duniter home

And force option '--home /var/lib/duniter' in the wrapper when not given.

It should help when running an interactive shell into the instance.
parent 5ab966f9
No related branches found
No related tags found
1 merge request!1387Docker - Duniter wrapper + Entrypoint can survive a config / peers.db loss
......@@ -46,8 +46,8 @@ RUN mkdir -p /var/lib/duniter /etc/duniter && chown duniter:duniter /var/lib/dun
# copy the build artifact from the build stage
COPY --from=build --chown=duniter:duniter /duniter/work /duniter
# install duniter executable symlink
RUN ln -s /duniter/bin/duniter /usr/bin/duniter
# copy duniter wrapper
COPY release/docker/duniter.sh /usr/bin/duniter
# copy entrypoint
COPY release/docker/docker-entrypoint.sh /
......@@ -61,7 +61,7 @@ EXPOSE 9220 10901 20901 30901
# use duniter user
USER duniter
WORKDIR /duniter
WORKDIR /var/lib/duniter
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD []
......@@ -78,9 +78,6 @@ if [ $# = 0 ]; then
set -- direct_webstart
fi
# Set --home option
set -- --home "$home" "$@"
# Start duniter
echo Starting duniter with:
echo /usr/bin/duniter "$@"
......
#!/bin/sh
cd /duniter
if [ "$1" != --home ]; then
set -- --home /var/lib/duniter "$@"
fi
exec bin/duniter "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment