subscription-manager repos --enable=rhel-7-server-rpms
subscription-manager repos --enable=rhel-7-server-extras-rpms
subscription-manager repos --enable=rhel-7-server-optional-rpms
yum install docker device-mapper-libs device-mapper-event-libs
systemctl start docker.service
systemctl enable docker.service
sudo yum install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel findutils
curl https://pyenv.run | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
BE SURE TO LOG OUT AND IN AGAIN (to activate these commands in .bashrc)
curl -O https://ftp.openssl.org/source/openssl-1.1.1t.tar.gz # or use wget
tar zxf openssl-1.1.1t.tar.gz
cd openssl-1.1.1t
./config --prefix=/opt/openssl/
make
make install
LDFLAGS="-Wl,-rpath,/opt/openssl/lib" CONFIGURE_OPTS="-with-openssl=/opt/openssl" pyenv install -v 3.11.3
pyenv virtualenv 3.11.3 curator
pyenv activate curator
git clone https://github.com/untergeek/curator.git
cd curator
git checkout -b rhel7docker
mv Dockerfile Dockerfile.orig
Create new Dockerfile
with provided file contents.
cp post4docker.py post4docker.py.orig
Really, TARGET
just changes from 'curator'
to '/curator_bin'
, but you can create the file with the provided contents.
docker build . -t curator_rhel7:VERSION
Where VERSION
should match what's in curator/curator/_version.py
docker run --privileged --rm --name curator-test -v /path/to/configfiles:/.curator curator_rhel7:VERSION --help
Where VERSION
should match what you built the Docker image with.
At this point, Curator should be able to be run using the Docker run instructions in the documentation, especially the part about needing to map a volume for the configuration files.
Of particular note with this version of Curator, it will NOT run if you do not add the --privileged
flag. Took me a bit to figure that out. It may behave differently for you depending on where your file path is, but I experimented with world-writable files in different paths and it would tell me:
Usage: curator [OPTIONS] ACTION_FILE
Try 'curator --help' for help.
Error: Invalid value for '--config': Path '/.curator/connection.yml' does not exist.
...if I did not add the --privileged
flag.