Docker compose files on EXAMPLES.md are out of date

Open Beginner friendly
#730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
Half a day
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
docker-compose
Domain
documentation

Research direction

Update the Docker Compose examples in EXAMPLES.md, starting with the standalone example linked in the issue and then checking the other compose snippets for the same outdated settings. Verify that the examples include the required Splunk terms acceptance and current Compose syntax, use clear service names, and provide a working local startup path.

Written by the indexing model from the issue text.

Description

Heya! I was happy to find an easy way to throw up a local splunk instance via the examples page - thanks.

However, if you use the compose file as is:

version: "3.6"

services:
  so1:
    image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
    container_name: so1
    environment:
      - SPLUNK_START_ARGS=--accept-license
      - SPLUNK_PASSWORD
    ports:
      - 8000:8000

There's a couple issues:

  • most importantly you need to add - SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com or else it won't start. Thank you for the very helpful error though!! (so1 | For example: docker run -e SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD splunk/splunk). This causes it fatally stop so should be fixed
  • you don't need container_name: so1 - it will use the service name above
  • i suggest renaming so1 to be splunk . I know there's lots more uses of this service name in the example doc, but so1 isn't useful when you do docker ps - especially if you have a couple dozen containers running like i do. Later on you can even rename uf1 to splunk-forwarder. We've got the power to have nice names ...yes!!
  • version: "3.6" can be removed - docker even complains ``version is obsolete, it will be ignored, please remove it to avoid potential confusion
  • make it a happy path and just put a janky default password in there. If you want to get fancy, you can use an .env file that has a random password in it like these fine docs here do - one copy and paste your secure!

Here's what I ended up with that worked:

services:
  splunk:
    image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
    environment:
      - SPLUNK_START_ARGS=--accept-license
      - SPLUNK_PASSWORD=${SPLUNK_PASSWORD:-password123}
      - SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com
    ports:
      - 8000:8000

sprinkle these changes through out the whole doc and keep up the good work!

Dominant language
Python
Stars
549
Forks
277
Avg merge
3d 9h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from splunk/docker-splunk

All issues in splunk/docker-splunk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.