Hi Guys. I am using Rancher desktop to load splunk...
# rancher-desktop
v
Hi Guys. I am using Rancher desktop to load splunk-latest image. I am unable to mount the volume. There are no errors in the logs. When I do docker cp command to manually copy the contents to the container path, its not copying too. I am attaching the docker run command for reference.
Copy code
docker run -d
      --name <container_name>
      -v /Applications/SplunkForwarder/etc/apps/<custom splunk app>/:/opt/splunk/etc/apps/<custom splunk app>
      -v /Applications/SplunkForwarder/etc/apps/<custom splunk app>/test:/opt/splunk/etc/apps/test
      -p ${PORT:=8001}:8000
      -e "SPLUNK_START_ARGS=--accept-license"
      -e 'SPLUNK_PASSWORD=changeme'
      -e 'SPLUNK_HOME_OWNERSHIP_ENFORCEMENT=false'
      -e 'SPLUNK_USER=root'
      splunk/splunk:latest
f
This happens because the
/Applications
directory is not mounted into the VM, so
/Applications/SplunkForwarder
does not exist in the guest, so cannot be bound to the container. This gives a list of all mounted host directories (assuming you use
reverse_sshfs
):
Copy code
$ rdctl shell mount | grep fuse | awk '{print $3}' | sort
/Applications/Rancher\<http://040Desktop.app/Contents/Resources/resources|040Desktop.app/Contents/Resources/resources>
/Users/jan
/Volumes
/private/tmp
/private/var/folders
/tmp/rancher-desktop
/var/folders
So the easiest workaround would be to install the SplunkForwarder into
~/Applications
instead of
/Applications
. Otherwise you would need to use a Lima override to mount the additional directory into the VM, but that is more fragile (e.g. will be deleted by a factory-reset).
v
@fast-garage-66093 Thanks a Lot. I solved this problem with your approach.