mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +00:00
docker: add an entrypoint wrapper and 6K block dump to import
Make privnet the default for docker setups along the way and use alpine as the base image because we now need to have sh and gzip. Fix #524.
This commit is contained in:
parent
969bfebe80
commit
2dfeb55d4c
3 changed files with 11 additions and 3 deletions
BIN
.docker/6000-privnet-blocks.acc.gz
Normal file
BIN
.docker/6000-privnet-blocks.acc.gz
Normal file
Binary file not shown.
6
.docker/privnet-entrypoint.sh
Executable file
6
.docker/privnet-entrypoint.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
if test -f /6000-privnet-blocks.acc.gz; then
|
||||
gunzip /6000-privnet-blocks.acc.gz
|
||||
/usr/bin/neo-go db restore -i /6000-privnet-blocks.acc
|
||||
fi
|
||||
/usr/bin/neo-go "$@"
|
|
@ -22,7 +22,7 @@ RUN set -x \
|
|||
&& go build -v -mod=vendor -ldflags "${LDFLAGS}" -o /go/bin/neo-go ./cli
|
||||
|
||||
# Executable image
|
||||
FROM scratch
|
||||
FROM alpine
|
||||
|
||||
ARG VERSION
|
||||
LABEL version=$VERSION
|
||||
|
@ -30,9 +30,11 @@ LABEL version=$VERSION
|
|||
WORKDIR /
|
||||
|
||||
COPY --from=builder /neo-go/config /config
|
||||
COPY --from=builder /neo-go/.docker/6000-privnet-blocks.acc.gz /
|
||||
COPY --from=builder /neo-go/.docker/privnet-entrypoint.sh /usr/bin/privnet-entrypoint.sh
|
||||
COPY --from=builder /go/bin/neo-go /usr/bin/neo-go
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
ENTRYPOINT ["/usr/bin/neo-go"]
|
||||
ENTRYPOINT ["/usr/bin/privnet-entrypoint.sh"]
|
||||
|
||||
CMD ["node", "--config-path", "/config", "--testnet"]
|
||||
CMD ["node", "--config-path", "/config", "--privnet"]
|
||||
|
|
Loading…
Reference in a new issue