I have built go-ethereum from source and I'm running on Ubuntu in a Docker container. I can run geth commands from the command line just fine, but I'm having trouble attaching to it or curling RPCalls to it.
For example:
nohup geth --verbosity 0 --rpc import /home/myvbo/cloudwallets/serverbinaries/blockchainTo1463224 &
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545
geth attach http://localhost:8545
The error message for the curl is curl: (7) Failed to connect to localhost port 8545: Connection refused
The error message for the attach is Fatal: Unable to attach to geth node - Invalid endpoint
What am I missing? Have I not completely configured geth for RPC?