Getting Data In

Does anyone have an updated Dockerfile for 7.1.0?

csmykay
New Member

The docker file for 7.1.0 referenced in Docker hub here:
https://hub.docker.com/r/splunk/splunk/

And more specifically here:
https://github.com/splunk/docker-splunk/blob/master/enterprise/Dockerfile

Still references 7.0.3. I looked through the file and I did not even see an "upgrade" process run after 7.0.3 is installed.

Does anyone have an updated Dockerfile for 7.1.0? Can I just change the version to 7.1.0 in the Dockerfile ENV variable?

0 Karma

csmykay
New Member

You can use my manaul update instructions above to get 7.1.1 docker file working for your enviroment. Also I see there is a 25 day old pull request to update the Dockerfile:
https://github.com/splunk/docker-splunk/pull/73/files

Here is my Docker file (changes in bold)

FROM debian:jessie

ENV SPLUNK_PRODUCT splunk
ENV SPLUNK_VERSION 7.1.1
ENV SPLUNK_BUILD 8f0ead9ec3db
ENV SPLUNK_FILENAME splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-Linux-x86_64.tgz

ENV SPLUNK_HOME /opt/splunk
ENV SPLUNK_GROUP splunk
ENV SPLUNK_USER splunk
ENV SPLUNK_BACKUP_DEFAULT_ETC /var/opt/splunk
ARG DEBIAN_FRONTEND=noninteractive

add splunk:splunk user

RUN groupadd -r ${SPLUNK_GROUP} \
&& useradd -r -m -g ${SPLUNK_GROUP} ${SPLUNK_USER}

make the "en_US.UTF-8" locale so splunk will be utf-8 enabled by default

RUN apt-get update && apt-get install -y --no-install-recommends apt-utils && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8

pdfgen dependency

RUN apt-get update && apt-get install -y libgssapi-krb5-2 && rm -rf /var/lib/apt/lists/*

Download official Splunk release, verify checksum and unzip in /opt/splunk

Also backup etc folder, so it will be later copied to the linked volume

RUN apt-get update && apt-get install -y wget sudo \
&& mkdir -p ${SPLUNK_HOME} \
&& wget -qO /tmp/${SPLUNK_FILENAME} https://download.splunk.com/products/${SPLUNK_PRODUCT}/releases/${SPLUNK_VERSION}/linux/${SPLUNK_FIL... \
&& wget -qO /tmp/${SPLUNK_FILENAME}.md5 https://download.splunk.com/products/${SPLUNK_PRODUCT}/releases/${SPLUNK_VERSION}/linux/${SPLUNK_FIL... \
&& (cd /tmp && md5sum -c ${SPLUNK_FILENAME}.md5) \
&& tar xzf /tmp/${SPLUNK_FILENAME} --strip 1 -C ${SPLUNK_HOME} \
&& rm /tmp/${SPLUNK_FILENAME} \
&& rm /tmp/${SPLUNK_FILENAME}.md5 \
&& apt-get purge -y --auto-remove wget \
&& mkdir -p /var/opt/splunk \
&& cp -R ${SPLUNK_HOME}/etc ${SPLUNK_BACKUP_DEFAULT_ETC} \
&& rm -fR ${SPLUNK_HOME}/etc \
&& chown -R ${SPLUNK_USER}:${SPLUNK_GROUP} ${SPLUNK_HOME} \
&& chown -R ${SPLUNK_USER}:${SPLUNK_GROUP} ${SPLUNK_BACKUP_DEFAULT_ETC} \
&& rm -rf /var/lib/apt/lists/* \

COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod +x /sbin/entrypoint.sh

Copy new license

COPY ./Splunk_Enterprise_Q3FY17.lic /var/opt/splunk/etc/licenses/download-trial/Splunk_Enterprise_Q3FY17.lic

Ports Splunk Web, Splunk Daemon, KVStore, Splunk Indexing Port, Network Input, HTTP Event Collector

EXPOSE 8000/tcp 8089/tcp 8191/tcp 9997/tcp 1514 8088/tcp

WORKDIR /opt/splunk

Configurations folder, var folder for everything (indexes, logs, kvstore)

VOLUME [ "/opt/splunk/etc", "/opt/splunk/var" ]

ENTRYPOINT ["/sbin/entrypoint.sh"]
CMD ["start-service"]

0 Karma

csmykay
New Member

So I tried to build the URL for the download manually and it does not work:

https://download.splunk.com/products/splunk/releases/7.1.0/linux/splunk-7.1.0-fa31da744b51-Linux-x86...

In order for this to work the build ID needs to updated as well I am guessing.

0 Karma

csmykay
New Member

O.k. I think reverse engineered this myself

Change Splunk version to "7.1.1" and change the build to "8f0ead9ec3db"

splunk-7.1.1-8f0ead9ec3db-Linux-x86_64.tgz

Don't you like it when you partners solve there own questions 🙂

0 Karma
Get Updates on the Splunk Community!

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...