Docker packaging for GAM, a command line tool for Google Workspace administration.
docker run --rm timjdfletcher/gam:latest --help./run buildTags follow the gam-v<version> convention. To release:
git tag -s gam-v0.2 -m "GAM v0.2"
git push origin gam-v0.2
./run releaseGAM requires OAuth2 credentials to interact with Google Workspace APIs. Initial setup (gam create project, gam oauth create) must be done interactively since it requires browser-based OAuth consent flows. Never bake credentials into the image.
Set up GAM on your host first, then mount the config directory:
docker run --rm -v /path/to/gam-config:/root/.gam timjdfletcher/gam:latest info domainMount only the required credential files as read-only, using tmpfs to avoid persisting cached tokens:
docker run --rm \
--tmpfs /root/.gam:size=1m \
-v /path/to/oauth2service.json:/root/.gam/oauth2service.json:ro \
-v /path/to/client_secrets.json:/root/.gam/client_secrets.json:ro \
-v /path/to/oauth2.txt:/root/.gam/oauth2.txt:ro \
timjdfletcher/gam:latest info domainGAM respects the GAMCFGDIR environment variable to locate its config:
docker run --rm \
-e GAMCFGDIR=/gam-config \
-v /path/to/gam-config:/gam-config:ro \
timjdfletcher/gam:latest info domain