A minimal Docker container to debug connectivity issues with Google Tag Manager's server bootstrap file on Scaleway Serverless Containers.
Containers are failing to fetch https://www.googletagmanager.com/static/serverjs/server_bootstrap.js during startup, causing errors like:
Error: connect ETIMEDOUT 142.251.220.168:443
Error: connect EHOSTUNREACH 2a00:1450:4006:811::2008:443 (this is expected, because IPv6 is not supported)
Fetching server bootstrap JS from https://www.googletagmanager.com/static/serverjs/server_bootstrap.js failed.
- Uses Node.js v22.16.0 (same as production)
- Attempts to fetch the GTM bootstrap file with detailed logging
- Performs connectivity checks (DNS resolution, etc.)
- Retries failed requests with timing information
- Starts an HTTP server on port 8080 for health checks
- Provides detailed error information to help debug the issue
# Build the container (force AMD64 architecture for compatibility)
docker build --platform=linux/amd64 -t gtm-debug .
# Run locally for testing
docker run -p 8080:8080 gtm-debug# macOS
brew install scw
# Linux/Windows - download from: https://github.com/scaleway/scaleway-cli/releases# Initialize with your credentials
scw init
# Or if already configured, make sure you're using the right project
scw config set default-project-id 6a52b596-0f8f-4213-9684-346578593db1# Build the container with Scaleway registry tag (AMD64 architecture required)
docker build --platform=linux/amd64 -t rg.fr-par.scw.cloud/gtm-debug-default/gtm-debug:latest .# Push the image
docker push rg.fr-par.scw.cloud/gtm-debug-default/gtm-debug:latest- Go to https://console.scaleway.com/
- Navigate to Serverless Containers
- Click "Create Container"
- Select your pushed image:
rg.fr-par.scw.cloud/gtm-debug-default/gtm-debug:latest - Set port to 8080
- Deploy
The container will show detailed logs including:
- Node.js version confirmation
- DNS resolution attempts
- Connectivity test results
- GTM bootstrap file fetch attempts with timing
- Server startup confirmation