Skip to content

Conversation

@jranson
Copy link
Contributor

@jranson jranson commented May 29, 2025

This PR adds a new create-wtih-registry subcommand to the build command that accepts image, registry and auth flags (in addition to the familiar build-id and build-tag flags).

Usage:

$ hathora build create-wtih-registry --image nginx:latest # docker hub image

$ hathora build create-wtih-registry --image userspace/image:latest # docker hub image

$ hathora build create-wtih-registry --image private.com/namespace/server:latest # private registry image

$ hathora build create-wtih-registry --image namespace/server:latest --registry private.com # also works

$ hathora build create-wtih-registry --image private.com/namespace/server:latest --auth $TOKEN # with auth
$ hathora build help create-wtih-registry
NAME:
   hathora build create-wtih-registry - create a build using a docker image in an external registry

USAGE:
   hathora build create-wtih-registry [command [command options]] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   Build:

   --auth <auth>                         optional <auth> credential for authenticating with a private registry [$HATHORA_BUILD_REGISTRY_AUTH]
   --build-id <id>, -b <id>              the <id> of the build in Hathora [$HATHORA_BUILD_ID]
   --build-tag <tag>, --bt <tag>         <tag> or external version to associate with the build [$HATHORA_BUILD_TAG]
   --image <image>, -i <image>           the docker <image> tag or url for the external image [$HATHORA_BUILD_IMAGE]
   --registry <registry>, -r <registry>  optional <registry> FQDN hosting the server image; can be in the image flag instead [$HATHORA_BUILD_REGISTRY]

   Global:

   --app-id <id>, -a <id>                     the <id> of the app in Hathora [$HATHORA_APP_ID]
   --config <path>, -c <path>                 <path> to the configuration file
   --hathora-cloud-endpoint <url>             override the default API base <url> (default: https://api.hathora.dev) [$HATHORA_CLOUD_ENDPOINT]
   --help, -h                                 show help (default: false)
   --output <format>, -o <format>             the <format> of the output. Supported values: (json, text, buildIdValue) (default: text) [$HATHORA_OUTPUT]
   --pretty                                   enable pretty output (json only) (default: true)
   --token <access-token>, -t <access-token>  <access-token> for authenticating with the API [$HATHORA_TOKEN]
   --verbose, -v                              enable verbose logging (default: false)
   --verbosity <level>                        set the logging verbosity <level> (0-3) (default: 0) [$HATHORA_VERBOSITY]

Also bumps all external dependency versions save for urfave/cli

jranson and others added 4 commits May 28, 2025 16:34
Signed-off-by: James Ranson <james@ranson.org>
Signed-off-by: James Ranson <james@virga.io>
Signed-off-by: James Ranson <james@virga.io>
Signed-off-by: James Ranson <james@virga.io>
Signed-off-by: James Ranson <james@virga.io>
@jranson jranson requested a review from jchu231 June 4, 2025 20:16
@jchu231 jchu231 merged commit ae9dcde into hathora:main Jun 18, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants