docker: fix ltcd ports
Fixes execution in `start-ltcctl.sh` and simplifies building `PARAMS` fixes `ltcctl` execution
This commit is contained in:
parent
1a5e39db88
commit
0328348431
@ -45,7 +45,7 @@ NETWORK=$(set_default "$NETWORK" "simnet")
|
|||||||
|
|
||||||
PARAMS=""
|
PARAMS=""
|
||||||
if [ "$NETWORK" != "mainnet" ]; then
|
if [ "$NETWORK" != "mainnet" ]; then
|
||||||
PARAMS=$(echo --$NETWORK)
|
PARAMS="--$NETWORK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PARAMS=$(echo $PARAMS \
|
PARAMS=$(echo $PARAMS \
|
||||||
|
@ -46,7 +46,7 @@ NETWORK=$(set_default "$NETWORK" "simnet")
|
|||||||
|
|
||||||
PARAMS=""
|
PARAMS=""
|
||||||
if [ "$NETWORK" != "mainnet" ]; then
|
if [ "$NETWORK" != "mainnet" ]; then
|
||||||
PARAMS=$(echo --$NETWORK)
|
PARAMS="--$NETWORK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PARAMS=$(echo $PARAMS \
|
PARAMS=$(echo $PARAMS \
|
||||||
@ -72,4 +72,3 @@ PARAMS="$PARAMS $@"
|
|||||||
# Print command and start bitcoin node.
|
# Print command and start bitcoin node.
|
||||||
echo "Command: btcd $PARAMS"
|
echo "Command: btcd $PARAMS"
|
||||||
exec btcd $PARAMS
|
exec btcd $PARAMS
|
||||||
|
|
||||||
|
@ -14,17 +14,14 @@ RUN GO111MODULE=on go install . ./cmd/ltcctl ./cmd/gencerts
|
|||||||
FROM alpine as final
|
FROM alpine as final
|
||||||
|
|
||||||
# Expose mainnet ports (server, rpc)
|
# Expose mainnet ports (server, rpc)
|
||||||
EXPOSE 8333 8334
|
EXPOSE 9333 9334
|
||||||
|
|
||||||
# Expose testnet ports (server, rpc)
|
# Expose testnet ports (server, rpc)
|
||||||
EXPOSE 18333 18334
|
EXPOSE 19334 19335
|
||||||
|
|
||||||
# Expose simnet ports (server, rpc)
|
# Expose simnet ports (server, rpc)
|
||||||
EXPOSE 18555 18556
|
EXPOSE 18555 18556
|
||||||
|
|
||||||
# Expose segnet ports (server, rpc)
|
|
||||||
EXPOSE 28901 28902
|
|
||||||
|
|
||||||
# Copy the compiled binaries from the builder image.
|
# Copy the compiled binaries from the builder image.
|
||||||
COPY --from=builder /go/bin/ltcctl /bin/
|
COPY --from=builder /go/bin/ltcctl /bin/
|
||||||
COPY --from=builder /go/bin/ltcd /bin/
|
COPY --from=builder /go/bin/ltcd /bin/
|
||||||
|
@ -43,10 +43,17 @@ RPCUSER=$(set_default "$RPCUSER" "devuser")
|
|||||||
RPCPASS=$(set_default "$RPCPASS" "devpass")
|
RPCPASS=$(set_default "$RPCPASS" "devpass")
|
||||||
NETWORK=$(set_default "$NETWORK" "simnet")
|
NETWORK=$(set_default "$NETWORK" "simnet")
|
||||||
|
|
||||||
exec ltcctl \
|
PARAMS=""
|
||||||
"--$NETWORK" \
|
if [ "$NETWORK" != "mainnet" ]; then
|
||||||
--rpccert="/rpc/rpc.cert" \
|
PARAMS="--$NETWORK"
|
||||||
--rpcuser="$RPCUSER" \
|
fi
|
||||||
--rpcpass="$RPCPASS" \
|
|
||||||
--rpcserver="rpcserver" \
|
PARAMS=$(echo $PARAMS \
|
||||||
"$@"
|
"--rpccert=/rpc/rpc.cert" \
|
||||||
|
"--rpcuser=$RPCUSER" \
|
||||||
|
"--rpcpass=$RPCPASS" \
|
||||||
|
"--rpcserver=rpcserver" \
|
||||||
|
)
|
||||||
|
|
||||||
|
PARAMS="$PARAMS $@"
|
||||||
|
exec ltcctl $PARAMS
|
||||||
|
@ -44,8 +44,12 @@ RPCPASS=$(set_default "$RPCPASS" "devpass")
|
|||||||
DEBUG=$(set_default "$DEBUG" "info")
|
DEBUG=$(set_default "$DEBUG" "info")
|
||||||
NETWORK=$(set_default "$NETWORK" "simnet")
|
NETWORK=$(set_default "$NETWORK" "simnet")
|
||||||
|
|
||||||
PARAMS=$(echo \
|
PARAMS=""
|
||||||
"--$NETWORK" \
|
if [ "$NETWORK" != "mainnet" ]; then
|
||||||
|
PARAMS="--$NETWORK"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PARAMS=$(echo $PARAMS \
|
||||||
"--debuglevel=$DEBUG" \
|
"--debuglevel=$DEBUG" \
|
||||||
"--rpcuser=$RPCUSER" \
|
"--rpcuser=$RPCUSER" \
|
||||||
"--rpcpass=$RPCPASS" \
|
"--rpcpass=$RPCPASS" \
|
||||||
@ -68,4 +72,3 @@ PARAMS="$PARAMS $@"
|
|||||||
# Print command and start bitcoin node.
|
# Print command and start bitcoin node.
|
||||||
echo "Command: ltcd $PARAMS"
|
echo "Command: ltcd $PARAMS"
|
||||||
exec ltcd $PARAMS
|
exec ltcd $PARAMS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user