Problem scenario
You want to set up (install and configure) Graylog from a Docker container. What do you do?
Solution
1. Verify you have a least two processors with this command: cat /proc/cpuinfo | grep -ic processor
Was the output two or more? If so, proceed. If not, get a server with two processors. If you are using an AWS EC-2 instance, see this link to add a processor. If you are using a GCP virtual server, see this posting for adding a processor.
2. Install Docker. If you need help with this, see this posting.
3. Run these four commands (where x.x.x.x in the final command below is the external IP address found with a "curl icanhazip.com" command):
docker pull graylog2/server
docker run --name contint-mongo -d mongo:2
docker run --name contint-elasticsearch -d elasticsearch:2 elasticsearch -Des.cluster.name="graylog"
docker run --link contint-mongo:mongo --link contint-elasticsearch:elasticsearch -p 9000:9000 -e GRAYLOG_WEB_ENDPOINT_URI="http://x.x.x.x:9000/api" -d graylog2/server
4. Wait a few minutes, and then open a web browser. Go to "http://x.x.x.x:9000/" (with no quotes), where x.x.x.x is the external IP address of the Linux server. The default credentials to the web UI of Graylog are as follows:
username: admin
password: admin