mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
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:
parent
bbe0b0384b
commit
8c3f6eb8f7
2 changed files with 12 additions and 16 deletions
12
Dockerfile
12
Dockerfile
|
@ -25,7 +25,7 @@ RUN cargo build --release
|
||||||
# runtime stage
|
# runtime stage
|
||||||
FROM debian:9.4
|
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 && \
|
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 && \
|
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
|
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/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 13413 13414 13415 13416
|
||||||
EXPOSE 13414
|
|
||||||
EXPOSE 13415
|
|
||||||
EXPOSE 13416
|
|
||||||
|
|
||||||
ENTRYPOINT ["grin", "server", "run"]
|
ENTRYPOINT ["grin", "server", "run"]
|
||||||
|
|
16
doc/build.md
16
doc/build.md
|
@ -100,16 +100,14 @@ troubleshooting, etc.
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
# Build using all available cores
|
```
|
||||||
docker build -t grin .
|
docker build -t grin .
|
||||||
|
```
|
||||||
|
|
||||||
# run in foreground
|
You can bind-mount your grin cache to run inside the container.
|
||||||
docker run -it -v grin:/usr/src/grin grin
|
```
|
||||||
|
docker run -it -d -v $HOME/.grin:/root/.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.
|
|
||||||
|
|
||||||
### Cross-platform builds
|
### Cross-platform builds
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue