da7b6b5c50
* bin: ability to use chain type argument for 'run' subcommand * docker: single image for mainnet and testnet, update build docs * docker: root user * github: ghcr publish * github: build image for master branch only * docs: fix paths * docker: move 'server run' to command * Revert "bin: ability to use chain type argument for 'run' subcommand" This reverts commit fc2d9199c3ff80c5c7305e3fc5b1f6fe86e8dacf. * docker: disable tui at config
40 lines
770 B
Docker
40 lines
770 B
Docker
# Builder
|
|
FROM rust:slim-trixie AS builder
|
|
|
|
WORKDIR /usr/src/grin
|
|
COPY . .
|
|
|
|
RUN apt update && \
|
|
apt install -y libncurses5-dev libncursesw5-dev
|
|
|
|
RUN cargo build --release
|
|
|
|
# Runner
|
|
FROM debian:trixie-slim
|
|
COPY --from=builder /usr/src/grin/target/release/grin /usr/local/bin/grin
|
|
|
|
RUN apt update && \
|
|
apt install -y libncursesw5-dev
|
|
|
|
# Create mainnet config
|
|
WORKDIR /root/.grin/main
|
|
RUN grin server config
|
|
RUN sed -i '/^run_tui /s/=.*$/= false/' grin-server.toml
|
|
|
|
# Create testnet config
|
|
WORKDIR /root/.grin/test
|
|
RUN grin --testnet server config
|
|
RUN sed -i '/^run_tui /s/=.*$/= false/' grin-server.toml
|
|
|
|
# Mainnet ports
|
|
EXPOSE 3413 3414
|
|
|
|
# Testnet ports
|
|
EXPOSE 13413 13414
|
|
|
|
# Stratum port
|
|
EXPOSE 3416
|
|
|
|
WORKDIR /root/.grin
|
|
ENTRYPOINT ["grin"]
|
|
CMD ["server", "run"] |