Add Docker support for Tutus
- Update Dockerfile for Tutus branding and Go 1.24 - Rename and simplify entrypoint script - Add docker-compose.yml for single-node testnet 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
cf8d3ce9f2
commit
84a1caace1
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
BIN=/usr/bin/neo-go
|
|
||||||
|
|
||||||
case $@ in
|
|
||||||
"node"*)
|
|
||||||
echo "=> Try to restore blocks before running node"
|
|
||||||
if [ -f "$ACC" ]; then
|
|
||||||
gunzip --stdout "$ACC" >/privnet.acc
|
|
||||||
${BIN} db restore -p --config-path /config -i /privnet.acc
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
${BIN} "$@"
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
BIN=/usr/bin/tutus
|
||||||
|
|
||||||
|
case $@ in
|
||||||
|
"node"*)
|
||||||
|
echo "=> Starting Tutus node"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
${BIN} "$@"
|
||||||
18
Dockerfile
18
Dockerfile
|
|
@ -1,17 +1,15 @@
|
||||||
# Builder image
|
# Builder image
|
||||||
# Keep go version in sync with Build GA job.
|
FROM golang:1.24-alpine AS builder
|
||||||
FROM golang:1.25-alpine AS builder
|
|
||||||
|
|
||||||
# Display go version for information purposes.
|
|
||||||
RUN go version
|
RUN go version
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk add --no-cache git make \
|
&& apk add --no-cache git make \
|
||||||
&& mkdir -p /tmp
|
&& mkdir -p /tmp
|
||||||
|
|
||||||
COPY . /neo-go
|
COPY . /tutus
|
||||||
|
|
||||||
WORKDIR /neo-go
|
WORKDIR /tutus
|
||||||
|
|
||||||
ARG REPO=repository
|
ARG REPO=repository
|
||||||
ARG VERSION=dev
|
ARG VERSION=dev
|
||||||
|
|
@ -26,11 +24,11 @@ LABEL version=$VERSION
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY --from=builder /neo-go/config /config
|
COPY --from=builder /tutus/config /config
|
||||||
COPY --from=builder /neo-go/.docker/privnet-entrypoint.sh /usr/bin/privnet-entrypoint.sh
|
COPY --from=builder /tutus/.docker/tutus-entrypoint.sh /usr/bin/tutus-entrypoint.sh
|
||||||
COPY --from=builder /neo-go/bin/neo-go /usr/bin/neo-go
|
COPY --from=builder /tutus/bin/tutus /usr/bin/tutus
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/privnet-entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/tutus-entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["node", "--config-path", "/config", "--privnet"]
|
CMD ["node", "--config-path", "/config", "--config-file", "/config/protocol.tutus.testnet.yml"]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Tutus Testnet - Single Node
|
||||||
|
# Run: docker-compose up -d
|
||||||
|
|
||||||
|
networks:
|
||||||
|
tutus_network:
|
||||||
|
name: tutus_network
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.201.0.0/24
|
||||||
|
gateway: 172.201.0.254
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
tutus_chain:
|
||||||
|
driver: local
|
||||||
|
|
||||||
|
services:
|
||||||
|
tutus:
|
||||||
|
container_name: tutus_node
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
command: "node --config-file /config/protocol.tutus.testnet.yml --force-timestamp-logs"
|
||||||
|
volumes:
|
||||||
|
- tutus_chain:/chains
|
||||||
|
ports:
|
||||||
|
- "10333:10333" # P2P
|
||||||
|
- "10332:10332" # RPC
|
||||||
|
- "2112:2112" # Prometheus
|
||||||
|
networks:
|
||||||
|
tutus_network:
|
||||||
|
ipv4_address: 172.201.0.10
|
||||||
Loading…
Reference in New Issue