Override the Docker command
Your deployments, whether in a continuously-running service or an occasionally-run job, will be run using the command (
CMD) defined either in your Dockerfile, or generated by the Buildpack used to build the image.
You can override this command from the CMD override page in your job or service by selecting edit commands, or select set CMD override from the deployment overview. Enter your command, check use override is enabled, and save to restart your containers with the new command.
To use the default command, open the command override editor dialog again, uncheck use override, and save and restart.
Overriding the command in an individual service or job allows you to run a build image without updating the Dockerfile or re-building it, or affecting any other deployments of the image.
CMD override format
The Docker CMD instruction is run in
exec form on Northflank, where the executable and parameters are given as elements in an array:
CMD ["executable", "parameter1", "parameter2"]
To enter your command, type it into the CMD Override field and it will be automatically formatted. You must include an executable as the first argument in the command. You can check how your command has been parsed before continuing.
As Northflank uses the
exec form by default, you must explicitly execute a shell (e.g.
/bin/sh -c) if you want to execute a shell command.
|Executes a shell to run |
If your Dockerfile defines an ENTRYPOINT instruction, the
ENTRYPOINT instruction and parameters will be processed first, then any
CMD instruction and parameters.
Build a repository using a Dockerfile
Configure your application build process using a Dockerfile.
Build a repository using Buildpacks
Build your application automatically using Buildpack stacks.
Set build arguments and inject runtime variables into running deployments.
Create groups of secrets
Create groups of secrets that can be inherited by specific projects or services.