jail-ai includes optimized layers for AWS and GCP development with pinned package versions to avoid unnecessary rebuilds.
All cloud tools have pinned versions in their Containerfiles. This ensures:
- Reproducible builds: Same Containerfile = same image
- Efficient caching: Layers are only rebuilt when versions change
- Controlled updates: You decide when to update tools
- AWS CLI: v2.34.2
- eksctl: v0.224.0
- SAM CLI: v1.154.0
- AWS CDK: v2.241.0
- Session Manager Plugin: v1.2.712.0
- cfn-lint: v1.46.0
- rain: v1.24.3
- AWS Copilot: v1.34.1
- Steampipe: v2.4.0
Use the provided update script to fetch and update all versions automatically:
# Run the update script
./scripts/update-cloud-versions.sh
# Review changes
git diff containerfiles/
# Rebuild layers
jail-ai claude --cloud --upgrade --force-layers aws,gcpThe script automatically fetches the latest versions from:
- GitHub releases (AWS CLI, eksctl, SAM CLI, CDK, cfn-lint, etc.)
- HashiCorp releases (Terraform)
- Kubernetes releases (kubectl)
Edit containerfiles/aws.Containerfile and update the ARG versions:
ARG AWS_CLI_VERSION=2.34.2 # Update this
ARG SAM_CLI_VERSION=1.154.0 # Update this
ARG AWS_CDK_VERSION=2.241.0 # Update this
# ... etcWhen you update any version, the Containerfile hash changes and the layer will rebuild automatically on next use.
- gcloud CLI: v513.0.0 (with emulators and auth plugins)
- Terraform: v1.15.0
- Pulumi: v3.224.0
- Cloud SQL Proxy: v2.21.1
- Skaffold: v2.17.2
- kubectl: v1.35.2
- Helm: v4.1.1
- kpt: v1.0.0-beta.61
Use the automatic update script (see AWS Tools section above) or edit manually:
ARG GCLOUD_VERSION=513.0.0 # Update this
ARG TERRAFORM_VERSION=1.15.0 # Update this
ARG KUBECTL_VERSION=1.35.2 # Update this
# ... etcjail-ai uses content-based hashing to detect changes:
- Each Containerfile is hashed (SHA256)
- Hash is stored as a label in the built image
- On subsequent runs, hash is compared
- If hash differs → rebuild layer
- If hash matches → reuse cached layer
To force rebuild of cloud layers:
# Rebuild all layers
jail-ai claude --cloud --upgrade
# Rebuild only AWS layer
jail-ai claude --cloud --upgrade --force-layers aws
# Rebuild only GCP layer
jail-ai claude --cloud --upgrade --force-layers gcp
# Rebuild both cloud layers
jail-ai claude --cloud --upgrade --force-layers aws,gcpInside a jail with cloud layers:
# AWS versions
aws --version
eksctl version
sam --version
cdk --version
# GCP versions
gcloud version
terraform version
pulumi version
kubectl version --client# Downloads latest version every time
RUN curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"Problem: Even with same Containerfile, package updates trigger rebuilds, wasting time and bandwidth.
ARG AWS_CLI_VERSION=2.22.17
RUN curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip"Benefit: Layers rebuild only when you update the version in the Containerfile.
Cloud layers include version labels for tracking:
# Check AWS layer versions
podman image inspect localhost/jail-ai-aws:latest --format '{{.Labels}}'
# Example output:
# ai.jail.aws.cli.version: 2.22.17
# ai.jail.aws.eksctl.version: 0.197.0
# ai.jail.aws.sam.version: 1.133.0
# ai.jail.aws.cdk.version: 2.175.2- Update periodically: Check for new tool versions monthly
- Test before updating: Verify compatibility with your projects
- Use
--upgradeafter version changes: Force rebuild to pick up new versions - Document breaking changes: Note any API changes in commit messages
- AWS CLI: https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst
- eksctl: https://github.com/eksctl-io/eksctl/releases
- SAM CLI: https://github.com/aws/aws-sam-cli/releases
- AWS CDK: https://github.com/aws/aws-cdk/releases
- cfn-lint: https://github.com/aws-cloudformation/cfn-lint/releases
- gcloud: https://cloud.google.com/sdk/docs/release-notes
- Terraform: https://github.com/hashicorp/terraform/releases
- Pulumi: https://github.com/pulumi/pulumi/releases
- kubectl: https://github.com/kubernetes/kubernetes/releases
- Helm: https://github.com/helm/helm/releases
Check if the Containerfile hash changed:
# Get current hash from image
podman image inspect localhost/jail-ai-aws:latest \
--format '{{index .Labels "ai.jail.containerfile.hash"}}'
# Compare with expected hash
# (jail-ai will show mismatches in debug logs)Force rebuild the layer:
jail-ai claude --cloud --upgrade --force-layers awsIf a tool version is incompatible, edit the Containerfile to pin a working version, then rebuild.