diff --git a/pde2e-image/Containerfile b/pde2e-image/Containerfile index 6b7ed11..a8e8883 100644 --- a/pde2e-image/Containerfile +++ b/pde2e-image/Containerfile @@ -21,6 +21,7 @@ FROM base AS linux ENV OS=linux FROM linux AS rhel +COPY /lib/unix/scripts/ ${ASSETS_FOLDER}/scripts/ COPY /lib/rhel/ ${ASSETS_FOLDER}/ COPY /lib/unix/ ${ASSETS_FOLDER}/unix/ COPY /common/unix/ ${ASSETS_FOLDER}/unix/common/ diff --git a/pde2e-image/lib/rhel/scripts/install_docker.sh b/pde2e-image/lib/rhel/scripts/install_docker.sh new file mode 100755 index 0000000..1ac2574 --- /dev/null +++ b/pde2e-image/lib/rhel/scripts/install_docker.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +echo "Installing Docker Engine on RHEL..." + +echo "Installing dnf-plugins-core..." +sudo dnf -y install dnf-plugins-core + +echo "Adding Docker CE repository..." +sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo + +echo "Installing Docker Engine packages..." +sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +echo "Starting and enabling Docker service..." +sudo systemctl enable --now docker + +echo "Adding current user to docker group..." +sudo usermod -aG docker "$(whoami)" + +docker --version +echo "Docker Engine installation complete." diff --git a/pde2e-image/lib/unix/scripts/install_podman_compose.sh b/pde2e-image/lib/unix/scripts/install_podman_compose.sh new file mode 100755 index 0000000..dcb43bd --- /dev/null +++ b/pde2e-image/lib/unix/scripts/install_podman_compose.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +echo "Installing podman-compose..." + +if sudo dnf install -y podman-compose 2>/dev/null; then + echo "podman-compose installed via dnf." +else + echo "dnf installation failed, falling back to pip..." + sudo dnf install -y python3-pip + pip3 install --user podman-compose + export PATH="$HOME/.local/bin:$PATH" +fi + +podman-compose --version +echo "podman-compose installation complete."