-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0de4bff
commit ef8f72f
Showing
8 changed files
with
289 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2018-2024 Splunk | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
ARG BASE_IMAGE=amazonlinux:2023 | ||
FROM ${BASE_IMAGE} as package | ||
|
||
LABEL name="splunk" \ | ||
maintainer="support@splunk.com" \ | ||
vendor="splunk" \ | ||
release="1" \ | ||
summary="Amazon-Linux-2023" \ | ||
description="Splunk Enterprise is a platform for operational intelligence. Our software lets you collect, analyze, and act upon the untapped value of big data that your technology infrastructure, security systems, and business applications generate. It gives you insights to drive operational performance and business results." | ||
|
||
|
||
COPY install.sh /install.sh | ||
|
||
RUN mkdir /licenses \ | ||
&& curl -o /licenses/apache-2.0.txt https://www.apache.org/licenses/LICENSE-2.0.txt | ||
|
||
RUN /install.sh && rm -rf /install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
#!/bin/bash | ||
# Copyright 2018-2024 Splunk | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e | ||
|
||
# Generate UTF-8 char map and locale | ||
# Reinstalling local English def for now, removed in minimal image: https://bugzilla.redhat.com/show_bug.cgi?id=1665251 | ||
dnf -y --nodocs install glibc-langpack-en | ||
|
||
# Currently there is no access to the UTF-8 char map. The following command is commented out until | ||
# the base container can generate the locale. | ||
# localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
# We get around the gen above by forcing the language install, and then pointing to it. | ||
export LANG=en_US.utf8 | ||
|
||
# Install utility packages | ||
dnf -y --nodocs install wget sudo shadow-utils procps tar make gcc \ | ||
openssl-devel bzip2-devel libffi-devel findutils \ | ||
libssh-devel libcurl-devel glib2-devel ncurses-devel \ | ||
diffutils bzip2 | ||
# Patch security updates | ||
dnf -y --nodocs update gnutls kernel-headers libdnf librepo libnghttp2 nettle \ | ||
libpwquality libxml2 systemd-libs lz4-libs curl \ | ||
rpm rpm-libs sqlite-libs cyrus-sasl-lib vim expat \ | ||
openssl-libs xz-libs zlib libsolv file-libs pcre \ | ||
libarchive libgcrypt libksba libstdc++ json-c gnupg | ||
|
||
# Reinstall tzdata (originally stripped from minimal image): https://bugzilla.redhat.com/show_bug.cgi?id=1903219 | ||
dnf -y --nodocs reinstall tzdata || dnf -y --nodocs update tzdata | ||
|
||
# Build and install busybox direct from the multiarch since EPEL isn't available yet for redhat8 | ||
cd ~ | ||
wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2 | ||
bzip2 -d busybox-1.36.1.tar.bz2 | ||
tar -xf busybox-1.36.1.tar | ||
cd busybox-1.36.1 | ||
make defconfig | ||
make | ||
cp busybox /bin/busybox | ||
cd ~ | ||
rm -rf busybox-1.36.1.tar busybox-1.36.1/ | ||
|
||
## Install Python and necessary packages | ||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
python3 get-pip.py | ||
rm -f get-pip.py | ||
ln -sf /usr/bin/python3 /usr/bin/python | ||
|
||
# Install splunk-ansible dependencies | ||
pip3 -q --no-cache-dir install --upgrade Mako avro lxml protobuf | ||
pip3 install setuptools | ||
pip3 install six | ||
pip3 install wheel | ||
pip3 install requests | ||
pip3 install cryptography==3.3.2 | ||
pip3 install jmespath | ||
pip3 install urllib3==1.26.5 | ||
pip3 install ansible | ||
cd / | ||
|
||
# Remove tests packaged in python libs | ||
find /usr/lib/ -depth \( -type d -a -not -wholename '*/ansible/plugins/test' -a \( -name test -o -name tests -o -name idle_test \) \) -exec rm -rf '{}' \; | ||
find /usr/lib/ -depth \( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) -exec rm -rf '{}' \; | ||
find /usr/lib/ -depth \( -type f -a -name 'wininst-*.exe' \) -exec rm -rf '{}' \; | ||
ldconfig | ||
|
||
# Cleanup | ||
dnf remove -y make gcc openssl-devel bzip2-devel findutils glib2-devel glibc-devel cpp binutils \ | ||
keyutils-libs-devel krb5-devel libcom_err-devel libffi-devel libcurl-devel \ | ||
libselinux-devel libsepol-devel libssh-devel libverto-devel libxcrypt-devel \ | ||
ncurses-devel pcre2-devel zlib-devel diffutils bzip2 | ||
dnf clean all | ||
|
||
# Enable busybox symlinks | ||
cd /bin | ||
BBOX_LINKS=( clear find diff hostname killall netstat nslookup ping ping6 readline route syslogd tail traceroute vi ) | ||
for item in "${BBOX_LINKS[@]}" | ||
do | ||
ln -s busybox $item || true | ||
done | ||
chmod u+s /bin/ping | ||
groupadd sudo | ||
|
||
echo " | ||
## Allows people in group sudo to run all commands | ||
%sudo ALL=(ALL) ALL" >> /etc/sudoers | ||
|
||
# Clean | ||
dnf clean all | ||
rm -rf /install.sh /anaconda-post.log /var/log/anaconda/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2018-2024 Splunk | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
ARG BASE_IMAGE=arm64v8/ubuntu:20.04 | ||
FROM ${BASE_IMAGE} as package | ||
|
||
LABEL name="splunk" \ | ||
maintainer="support@splunk.com" \ | ||
vendor="splunk" \ | ||
release="1" \ | ||
summary="arm64 Ubuntu 20 Docker image of Splunk Enterprise" \ | ||
description="Splunk Enterprise is a platform for operational intelligence. Our software lets you collect, analyze, and act upon the untapped value of big data that your technology infrastructure, security systems, and business applications generate. It gives you insights to drive operational performance and business results." | ||
|
||
COPY install.sh /install.sh | ||
|
||
RUN /install.sh \ | ||
&& rm -rf /install.sh \ | ||
&& mkdir /licenses \ | ||
&& curl -o /licenses/apache-2.0.txt https://www.apache.org/licenses/LICENSE-2.0.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
# Copyright 2018-2024 Splunk | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e | ||
|
||
# Generate UTF-8 char map and locale | ||
apt-get update -y | ||
apt-get install -y --no-install-recommends locales wget gnupg tzdata | ||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen | ||
rm -f /usr/share/locale/locale.alias | ||
ln -s /etc/locale.alias /usr/share/locale/locale.alias | ||
locale-gen | ||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
export LANG=en_US.utf8 | ||
|
||
# Set timezone to use UTC | ||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime | ||
/usr/sbin/dpkg-reconfigure -f noninteractive tzdata | ||
|
||
# Install utility packages | ||
apt-get install -y --no-install-recommends curl sudo libgssapi-krb5-2 busybox procps acl gcc make build-essential \ | ||
libffi-dev libssl-dev libbz2-dev python3-apt python3-distutils \ | ||
xz-utils ca-certificates zlib1g-dev p11-kit liblz4-dev | ||
|
||
# Install Python and necessary packages | ||
wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py | ||
/usr/bin/python3.8 get-pip.py | ||
ln -sf /usr/bin/python3.8 /usr/bin/python | ||
ln -sf /usr/bin/pip3.8 /usr/bin/pip | ||
|
||
# Install splunk-ansible dependencies | ||
cd / | ||
pip -q --no-cache-dir install six wheel requests cryptography==3.3.2 ansible==3.4.0 urllib3==1.26.5 jmespath --upgrade | ||
# Remove tests packaged in python libs | ||
find /usr/lib/ -depth \( -type d -a -not -wholename '*/ansible/plugins/test' -a \( -name test -o -name tests -o -name idle_test \) \) -exec rm -rf '{}' \; | ||
find /usr/lib/ -depth \( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) -exec rm -rf '{}' \; | ||
find /usr/lib/ -depth \( -type f -a -name 'wininst-*.exe' \) -exec rm -rf '{}' \; | ||
ldconfig | ||
|
||
apt-get remove -y --allow-remove-essential gcc libffi-dev libssl-dev make build-essential libbz2-dev xz-utils zlib1g-dev | ||
apt-get autoremove -y --allow-remove-essential | ||
|
||
# Enable busybox symlinks | ||
cd /bin | ||
BBOX_LINKS=( clear find diff hostname killall netstat nslookup ping ping6 readline route syslogd tail traceroute vi ) | ||
for item in "${BBOX_LINKS[@]}" | ||
do | ||
ln -s busybox $item || true | ||
done | ||
chmod u+s /bin/ping | ||
|
||
# Clean | ||
apt clean autoclean | ||
rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.