Docker image that extends the cimg/node image with Google's Cloud SDK and additional tools for CI/CD pipelines.
- Node.js: 22.19.0 (pinned to specific version)
- Google Cloud SDK: 538.0.0
- Additional Tools: kubectl, Helm (v3.4.2), Skaffold (v1.17.2), jq
# Use in your CircleCI config
docker: fyndiq/circleci-node-gcloudsdk:node-lts-gcloudsdk538.0.0-v1Important: This image must be built for linux/amd64 architecture to be compatible with CircleCI runners.
# Build for production (amd64 - CircleCI compatible)
make build
# Build for local testing (native architecture)
make build-localRun the comprehensive test suite to verify all tools work correctly:
./test-image.shThe test script will verify:
- ✅ Node.js version and npm
- ✅ Google Cloud SDK functionality
- ✅ kubectl, Helm, Skaffold, and jq tools
- ✅ CircleCI user setup and sudo access
# Builds for amd64 and pushes directly
make pushNote: make push automatically builds for linux/amd64 and pushes to ensure CircleCI compatibility.
-
Check available
cimg/nodetags at CircleCI Node Images -
Update the
FROMline inDockerfile:FROM cimg/node:22.19.0 # Pinned to specific version -
Update the tag in
Makefile:TAG=node-lts-gcloudsdk538.0.0-v1 # Use lts or specific version number
-
Update the test script tag in
test-image.sh -
Test the changes:
./test-image.sh
-
Find latest version:
curl -s https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-all/Packages | grep "Version:" | sort -V | tail -5
-
Update
GOOGLE_SDK_VERSIONinDockerfile:ARG GOOGLE_SDK_VERSION=538.0.0-0 # Change to desired version -
Update the tag in
Makefileandtest-image.sh -
Test the changes:
./test-image.sh
Edit the respective ARG variables in the Dockerfile:
SKAFFOLD_VERSIONfor SkaffoldHELM_VERSIONfor Helm
Architecture Issues in CircleCI
- Error: "found arm64 but need [amd64 i386 386]"
- Solution: Rebuild with
make push(builds for amd64 automatically) - Cause: Image was built on Apple Silicon (arm64) but CircleCI needs amd64
Google Cloud SDK Installation Fails
- Ensure you're using the correct package name (
google-cloud-clivsgoogle-cloud-sdk) - Check version compatibility with the base Node.js image
Node.js Version Mismatch
- Important: CircleCI's
cimg/node:22.19is a floating tag that updates to newer patch versions - To lock to an exact version, use specific version tag:
FROM cimg/node:22.19.0 - For ultimate locking, use SHA digest:
FROM cimg/node:22.19.0@sha256:... - Verify the exact version:
docker run --rm cimg/node:VERSION node --version - Find image digests at: CircleCI Docker Hub
Build Performance
- Docker layers are cached for faster rebuilds
- Use
docker system pruneif builds become slow
See Dockerhub for all available tags.
- Make your changes
- Run tests:
./test-image.sh - Ensure all tests pass before pushing
- Update this README if changing versions or adding features