Skip to main content

sng run

Beta

Being rolled out. The interface described here is the one of the next release: it may still change, and may not be enabled on your tenant yet.

sng run is being rolled out in the CLI.

sng run [FOLDER] -p PORT [--purge] [-f DOCKERFILE] [--name NAME] [--env K=V]...
[--size SIZE] [--user UID] [--egress-internet]

Builds FOLDER (default .), runs it as an ephemeral application on your tenant, reachable over HTTPS, and shows its state, address and logs live. Ctrl-C stops and deletes the application: it is the shortest way to see a project run, before declaring it by manifest.

Prerequisites: sng sso login, a tenant session (sng tenant use NAME), and docker (with buildx) on your machine.

ArgumentDescription
FOLDERbuild folder (default .), containing the Dockerfile
FlagTypeDefaultDescription
-p, --portinteger(required)port the container listens on; the application is exposed over HTTPS on this port
--purgeboolfalseon exit, also deletes the image repository (see below)
-f, --filestringFOLDER/Dockerfilepath of the Dockerfile
--namestringfolder namename of the application; the repository becomes tmp-<name>
--envK=V, repeatableenvironment variable of the container
--sizestringapplication size, as sng app create
--userintegerUID the container runs as, as sng app create
--egress-internetboolfalselets the container reach the Internet, as sng app create

What the command does​

  1. Builds the image with docker buildx and pushes it to the tmp-<folder> repository of your registry, with the tag run-<YYYYMMDD-HHMMSS> (UTC). The repository is created if it does not exist.
  2. Creates the application, named after the folder, exposed over HTTPS on the given port.
  3. Follows live: the state (waiting, rolling out, certificate pending, ready), the address (shown once, as soon as it exists), the event journal and the container logs.
cd web && sng run -p 8080
sng run │ build et push de ovh-gra-0.registry.dev.stackngo.fr/acme/tmp-web:run-20261029-201500…
sng run │ App web déployée (port 8080) ; Ctrl-C pour l'arrêter et la supprimer
sng run │ état : prête
sng run │ URL : https://web-web.acme.dev.stackngo.fr
sng run │ • 20:15:12 Instance démarrée
10.0.0.1 - - [29/Oct/2026:20:15:20 +0000] "GET / HTTP/1.1" 200 615
^C
sng run │ arrêt demandé : nettoyage… (Ctrl-C à nouveau pour abandonner)
sng run │ App web supprimée

Container logs go to standard output, everything else to standard error: sng run -p 8080 > logs.txt keeps only the logs. Logs resume by themselves after a cut; a few lines may then appear twice or be missing.

Stopping​

  • Ctrl-C, SIGTERM or closing the terminal delete the application. The image is kept; the command to delete it is printed.
  • --purge also deletes the tmp-<folder> repository when sng run created it (deletion policy Delete) and it only holds run-* images. Otherwise (a repository you declared yourself, or one that holds other tags), only the image of the session is deleted, and never if another tag points to it.
  • A second Ctrl-C gives up the cleanup and prints the commands that remain to be run (exit code 1).

Limits​

  • An application of the same name that was not created by sng run is never replaced: une App <name> existe et n'a pas été créée par sng run : choisissez --name. Pick another name with --name. sng run recognises its applications by their shape: a single service, named like the application, whose image is tmp-<name>:run-* in your registry.
  • If the process is killed abruptly (SIGKILL, network loss), the application stays: the next sng run replaces it, or delete it with sng app delete NAME --yes.
  • No vulnerability scan (use sng registry build) and no --json output.
  • For a lasting application, declare it by manifest: sng detect generates one.

Typical errors​

MessageCause
required flag(s) "port" not set-p missing
docker is required …docker not in the PATH
une App … existe et n'a pas été créée par sng run : choisissez --namename already taken by another application
forbidden (no policy of this tenant allows it: see sng tenant policy list)a right is missing on the registry (registry:push) or on applications (deploy:write)

See also​