Dashboards & Visualizations

Docker YML Compose file - How do I use different web UI port?

spammenot66
Contributor

When setting up splunk in dockers using a compose file, how to i set it to use port 58000 instead of the default 8000 for the web ui? Same question goes to other ports, how do i force it to use different ports that's not the default?

below is my current .yml file

services:
splunkenterprise:
#build: .
hostname: splunk
image: splunk/splunk
environment:
SPLUNK_START_ARGS: --accept-license
SPLUNK_ENABLE_LISTEN: 59997
SPLUNK_ADD: tcp 51514
ports:
- "58000:58000"
- "59997:59997"
- "58088:58088"
- "51514:51514"

0 Karma
1 Solution

outcoldman
Communicator

@spammenot66 please take a look on compose reference documentation https://docs.docker.com/compose/compose-file/#ports. Every port line is defined as HOST:CONTAINER, so in your chase if you want to map container port 8000 to host port 58000 you need to do it as

ports:
- "58000:8000"
- "59997:9997"
- "58088:8088"
- "51514:1514"

View solution in original post

0 Karma

outcoldman
Communicator

@spammenot66 please take a look on compose reference documentation https://docs.docker.com/compose/compose-file/#ports. Every port line is defined as HOST:CONTAINER, so in your chase if you want to map container port 8000 to host port 58000 you need to do it as

ports:
- "58000:8000"
- "59997:9997"
- "58088:8088"
- "51514:1514"
0 Karma

spammenot66
Contributor

@outcoldman Thank you sir!! That definitely solved my issue. Happy holidays!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...