At the moment the following appears to work: alphanet.sh start --rpc-port 127.0.0.1:8732
.
Note --rpc-port
and NOT --rpc-addr
, this is a special case option in alphanet.sh.
This will insert a entry:
ports:
- "127.0.0.1:8732:8732"
into the generated docker-compose.yaml, causing the RPC to be exposed to localhost at the specified port -- it was already exposed as usual with --rpc-addr
in the tezos-node itself, but only inside the container.
This is documented, sort of:
./scripts/alphanet.sh start [--rpc-port <int>] [OPTIONS]
Launch a full Tezos alphanet node in a docker container
automatically generating a new network identity.
OPTIONS (others than --rpc-port) are directly passed to the
Tezos node, see './scripts/alphanet.sh shell tezos-node config --help'
for more details.
By default, the RPC port is not exported outside the docker
container. WARNING: when exported some RPCs could be harmful
(e.g. 'inject_block', 'force_validation', ...), it is
advised not to export them publicly.
Even though a port was expected (<int>
), --rpc-port 127.0.0.1:8732
happens to work, and should be generally safer.