Dockerfile updates (#1580)

* pregenerate config and disable tui
* install openssl now that native-tls is pulled in
* EXPOSE directive cleanup
* Update build instructions
This commit is contained in:
Michalis Kargakis 2018-09-25 22:18:17 +02:00 committed by Ignotus Peverell
parent bbe0b0384b
commit 8c3f6eb8f7
2 changed files with 12 additions and 16 deletions

View file

@ -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"]

View file

@ -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