sng run
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.
| Argument | Description |
|---|---|
FOLDER | build folder (default .), containing the Dockerfile |
| Flag | Type | Default | Description |
|---|---|---|---|
-p, --port | integer | (required) | port the container listens on; the application is exposed over HTTPS on this port |
--purge | bool | false | on exit, also deletes the image repository (see below) |
-f, --file | string | FOLDER/Dockerfile | path of the Dockerfile |
--name | string | folder name | name of the application; the repository becomes tmp-<name> |
--env | K=V, repeatable | environment variable of the container | |
--size | string | application size, as sng app create | |
--user | integer | UID the container runs as, as sng app create | |
--egress-internet | bool | false | lets the container reach the Internet, as sng app create |
What the command does
- Builds the image with
docker buildxand pushes it to thetmp-<folder>repository of your registry, with the tagrun-<YYYYMMDD-HHMMSS>(UTC). The repository is created if it does not exist. - Creates the application, named after the folder, exposed over HTTPS on the given port.
- 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,
SIGTERMor closing the terminal delete the application. The image is kept; the command to delete it is printed. --purgealso deletes thetmp-<folder>repository whensng runcreated it (deletion policyDelete) and it only holdsrun-*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 runis never replaced:une App <name> existe et n'a pas été créée par sng run : choisissez --name. Pick another name with--name.sng runrecognises its applications by their shape: a single service, named like the application, whose image istmp-<name>:run-*in your registry. - If the process is killed abruptly (
SIGKILL, network loss), the application stays: the nextsng runreplaces it, or delete it withsng app delete NAME --yes. - No vulnerability scan (use
sng registry build) and no--jsonoutput. - For a lasting application, declare it by manifest:
sng detectgenerates one.
Typical errors
| Message | Cause |
|---|---|
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 --name | name 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) |