I've followed the documentation on https://hub.docker.com/r/jbenet/go-ipfs/#docker-usage and have managed to add the files I want and could access them from the localhost+hash url. I'm having difficulty running the name publish command to publish the file publicly. Below are the commands in which I've tried.
The error I am getting is this: Error: invalid 'ipfs ref' path
TLDR: ipfs name publish --help and docker exec --help might help
ipfs name publish --help
docker exec --help
You mught want to use -it and the full IPFS path:
docker exec -it ID ipfs name publish /ipfs/QmfUAkhaGYZ9BGVNdAxvByXwFp7sRF6y4sgkMSo9nnpQ2m