diff --git a/.github/workflows/test-docker-image.yaml b/.github/workflows/test-docker-image.yaml index 952ad93..7a241b1 100644 --- a/.github/workflows/test-docker-image.yaml +++ b/.github/workflows/test-docker-image.yaml @@ -63,23 +63,11 @@ jobs: run: | # Pull the test image docker pull ghcr.io/${{ env.OWNER }}/github-runner:test - - # Verify Atmos - echo "Checking Atmos..." - docker run --rm ghcr.io/${{ env.OWNER }}/github-runner:test atmos version - - # Verify Terraform - echo "Checking Terraform..." - docker run --rm ghcr.io/${{ env.OWNER }}/github-runner:test terraform version - - # Verify tfcmt - echo "Checking tfcmt..." - docker run --rm ghcr.io/${{ env.OWNER }}/github-runner:test tfcmt --version - - # Verify terraform-docs - echo "Checking terraform-docs..." - docker run --rm ghcr.io/${{ env.OWNER }}/github-runner:test terraform-docs --version - + + # Verify AWS CLI + echo "Checking AWS CLI..." + docker run --rm ghcr.io/${{ env.OWNER }}/github-runner:test aws --version + # Summary echo "✅ All tools verified successfully!" echo "The Docker image is ready to use and will avoid GitHub API rate limits." diff --git a/Dockerfile b/Dockerfile index a890360..5fac21f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,8 @@ RUN sudo apt-get update && \ sudo apt-get install -y software-properties-common && \ # Retry PPA addition in case Launchpad is temporarily unavailable for i in 1 2 3; do \ - sudo add-apt-repository ppa:deadsnakes/ppa -y && break || \ - (echo "PPA add failed (attempt $i/3), retrying in 10 seconds..." && sleep 10); \ + sudo add-apt-repository ppa:deadsnakes/ppa -y && break || \ + (echo "PPA add failed (attempt $i/3), retrying in 10 seconds..." && sleep 10); \ done && \ sudo apt-get update && \ sudo apt-get install -y python3.11 python3.11-venv python3.11-dev python3-pip && \ @@ -30,62 +30,5 @@ RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zi && sudo ./aws/install \ && sudo rm -rf aws awscliv2.zip -# Install workflow tools to avoid GitHub API rate limits during execution -# All tools are installed in a single layer to minimize image size -RUN set -eux; \ - ARCH="$(uname -m)"; \ - case "$ARCH" in \ - x86_64) ARCH='amd64' ;; \ - aarch64) ARCH='arm64' ;; \ - *) echo "Unsupported architecture: $ARCH"; exit 1 ;; \ - esac; \ - \ - # Install Atmos CLI v1.195.0 - echo "Installing Atmos CLI v1.195.0..."; \ - curl -fsSL "https://github.com/cloudposse/atmos/releases/download/v1.195.0/atmos_1.195.0_linux_${ARCH}" -o /tmp/atmos && \ - sudo install -m 755 /tmp/atmos /usr/local/bin/atmos && \ - rm /tmp/atmos && \ - atmos version && \ - \ - # Install Terraform v1.9.8 - echo "Installing Terraform v1.9.8..."; \ - curl -fsSL "https://releases.hashicorp.com/terraform/1.9.8/terraform_1.9.8_linux_${ARCH}.zip" -o /tmp/terraform.zip && \ - sudo unzip -q /tmp/terraform.zip -d /usr/local/bin/ && \ - rm /tmp/terraform.zip && \ - terraform version && \ - \ - # Install tfcmt v4.14.5 - echo "Installing tfcmt v4.14.5..."; \ - curl -fsSL "https://github.com/suzuki-shunsuke/tfcmt/releases/download/v4.14.5/tfcmt_linux_${ARCH}.tar.gz" -o /tmp/tfcmt.tar.gz && \ - sudo tar -xzf /tmp/tfcmt.tar.gz -C /usr/local/bin/ tfcmt && \ - rm /tmp/tfcmt.tar.gz && \ - tfcmt --version && \ - \ - # Install terraform-docs v0.18.0 - echo "Installing terraform-docs v0.18.0..."; \ - curl -fsSL "https://github.com/terraform-docs/terraform-docs/releases/download/v0.18.0/terraform-docs-v0.18.0-linux-${ARCH}.tar.gz" -o /tmp/terraform-docs.tar.gz && \ - sudo tar -xzf /tmp/terraform-docs.tar.gz -C /usr/local/bin/ terraform-docs && \ - rm /tmp/terraform-docs.tar.gz && \ - terraform-docs --version && \ - \ - echo "All tools installed successfully!" - - -ENV PATH="/home/runner/.local/share/aquaproj-aqua/bin:${PATH}" -RUN set -eux; \ - curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v3.1.2/aqua-installer | bash -s -- -v v2.50.0; \ - printf '%s\n' \ - 'registries:' \ - ' - type: standard' \ - ' ref: v4.233.0' \ - 'packages:' \ - ' - name: suzuki-shunsuke/tfcmt@v4.14.5' \ - ' - name: terraform-docs/terraform-docs@v0.18.0' \ - > /tmp/aqua.yaml; \ - AQUA_CONFIG=/tmp/aqua.yaml aqua install; \ - rm /tmp/aqua.yaml - RUN mkdir -p ~/.ssh && \ ssh-keyscan github.com >> ~/.ssh/known_hosts - -RUN mkdir -p ./rootfs/usr/local/etc/atmos/