diff --git a/Dockerfile b/Dockerfile index 00a99f7a9..9b5cc7716 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN cargo build --release # runtime stage FROM debian:9.4 -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales openssl RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ dpkg-reconfigure --frontend=noninteractive locales && \ @@ -34,13 +34,11 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ ENV LANG en_US.UTF-8 COPY --from=builder /usr/src/grin/target/release/grin /usr/local/bin/grin -COPY --from=builder /usr/src/grin/grin.toml /usr/src/grin/grin.toml -WORKDIR /usr/src/grin +WORKDIR /root/.grin +RUN grin server config && \ + sed -i -e 's/run_tui = true/run_tui = false/' grin-server.toml -EXPOSE 13413 -EXPOSE 13414 -EXPOSE 13415 -EXPOSE 13416 +EXPOSE 13413 13414 13415 13416 ENTRYPOINT ["grin", "server", "run"] diff --git a/doc/build.md b/doc/build.md index d5e2715ae..fdddcf756 100644 --- a/doc/build.md +++ b/doc/build.md @@ -100,16 +100,14 @@ troubleshooting, etc. ## Docker - # Build using all available cores - docker build -t grin . +``` +docker build -t grin . +``` - # run in foreground - docker run -it -v grin:/usr/src/grin grin - - # or in background - docker run -it -d -v grin:/usr/src/grin grin - -If you decide to use a persistent storage (e.g. ```-v grin:/usr/src/grin```) you will need grin-server.toml configuration file in it. +You can bind-mount your grin cache to run inside the container. +``` +docker run -it -d -v $HOME/.grin:/root/.grin grin +``` ### Cross-platform builds