Reputation: 1
Accessing the data inside Solr is cumbersome. Need to ssh into /var/solr directory, and then use command-line operations. So instead, if I can just expose the data directory to a Samba share, and access with a GUI, that is more user-friendly.
At the moment, I am trying to get it to work on my local machine.
solr-develop.Dockerfile
FROM solr:9.6.0 as solr_dev
LABEL name="Solr DEVELOP"
# Switch to root to install packages
USER root
# Install Samba
RUN apt update && \
apt install -y samba && \
apt install -y samba-common-bin && \
apt install net-tools && \
apt clean && \
rm -rf /var/lib/apt/lists/*
# Switch back to the Solr user
USER solr
# Copy the Samba configuration file
COPY data/samba/smb.conf /etc/samba/smb.conf
# Expose Samba ports
EXPOSE 139 445
ENTRYPOINT ["docker-entrypoint.sh", "solr", "start", "-c", "-f"]
solr-develop.docker-compose.yaml
name: 'solr_develop'
version: '0.1'
services:
solr:
container_name: solr_develop
build:
context: .
dockerfile: solr-develop.Dockerfile
ports:
################### Solr ###################
- "8983:8983"
############################################
############### Samba server ###############
- "139:139"
# 445 already in use by local system
- "446:445"
############################################
volumes:
- ./data/solr:/var/solr
# command:
# - solr-precreate
smb.conf
[global]
loglevel = 5
workgroup = WORKGROUP
server string = Samba Server
security = user
map to guest = Bad User
dns proxy = no
[solr]
path = /var/solr
browsable = yes
writable = yes
guest ok = yes
read only = no
With the Samba service active, I expected the share to appear on my local Windows Network discovery somehow. I do not know the following:
Upvotes: 0
Views: 104