Skip to content

Commit 6b78733

Browse files
author
mikedickey
authored
Merge pull request #202 from splunk/add-etc-directory-fix-home
Added /opt/splunk/etc to image and made some updates to splunk's home
2 parents 18416b0 + feba747 commit 6b78733

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

splunk/common-files/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ FROM ${SPLUNK_BASE_IMAGE}:latest as package
2121
ARG SPLUNK_BUILD_URL
2222
COPY splunk/common-files/make-minimal-exclude.py /tmp
2323
RUN python /tmp/make-minimal-exclude.py ${SPLUNK_BUILD_URL} > /tmp/splunk-minimal-exclude.list
24-
RUN echo "Downloading Splunk and validating the checksum at: ${SPLUNK_BUILD_URL}"
2524
RUN wget -qO /tmp/splunk.tgz ${SPLUNK_BUILD_URL}
2625
RUN wget -qO /tmp/splunk.tgz.md5 ${SPLUNK_BUILD_URL}.md5
2726
RUN test $(md5sum /tmp/splunk.tgz | sed 's,\([a-z0-9]*\).*,\1,') = $(cat /tmp/splunk.tgz.md5 | sed 's,MD5.*=.\([a-z0-9]*\).*,\1,')
28-
RUN mkdir -p /opt/splunk/var /minimal/splunk/var /extras/splunk/var
27+
RUN mkdir -p /minimal/splunk/var /extras/splunk/var
2928
RUN tar -C /minimal/splunk --strip 1 --exclude-from=/tmp/splunk-minimal-exclude.list -zxf /tmp/splunk.tgz
3029
RUN tar -C /extras/splunk --strip 1 --wildcards --files-from=/tmp/splunk-minimal-exclude.list -zxf /tmp/splunk.tgz
3130
RUN mv /minimal/splunk/etc /minimal/splunk-etc
3231
RUN mv /extras/splunk/etc /extras/splunk-etc
33-
RUN mkdir -p /minimal/splunk/share/splunk/search_mrsparkle/modules.new
32+
RUN mkdir -p /minimal/splunk/etc /minimal/splunk/share/splunk/search_mrsparkle/modules.new
3433
COPY splunk/common-files/apps /extras/splunk-etc/apps/
3534

3635

@@ -56,7 +55,8 @@ COPY [ "splunk/common-files/updateetc.sh", "/sbin/" ]
5655

5756
# Setup users and groups
5857
RUN groupadd -r -g ${GID} ${SPLUNK_GROUP} \
59-
&& useradd -r -m -u ${UID} -g ${GID} ${SPLUNK_USER} \
58+
&& useradd -r -m -u ${UID} -g ${GID} -s /sbin/nologin -d ${SPLUNK_HOME} ${SPLUNK_USER} \
59+
&& chown -R splunk.splunk ${SPLUNK_HOME} \
6060
&& chmod 755 /sbin/updateetc.sh
6161

6262
COPY --from=package --chown=splunk:splunk /minimal /opt

0 commit comments

Comments
 (0)