-
Notifications
You must be signed in to change notification settings - Fork 986
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (33 loc) · 1021 Bytes
/
Dockerfile
File metadata and controls
45 lines (33 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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 && \
apt-get install -y ca-certificates && update-ca-certificates
# Create mainnet config
WORKDIR /root/.grin/main
RUN grin server config
RUN sed -i '/^run_tui /s/=.*$/= false/' grin-server.toml
RUN sed -i '/^api_http_addr /s/=.*$/= "0.0.0.0:3413"/' 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
RUN sed -i '/^api_http_addr /s/=.*$/= "0.0.0.0:13413"/' grin-server.toml
VOLUME ["/root/.grin"]
# Mainnet ports
EXPOSE 3413 3414
# Testnet ports
EXPOSE 13413 13414
# Stratum port
EXPOSE 3416
WORKDIR /root/.grin
ENTRYPOINT ["grin", "--no-tui"]
CMD ["server", "run"]