The main Nixpacks commands are
Create an image from an app source directory. The resulting image can then be run using Docker.
nixpacks build ./path/to/app --name my-app
View all build options with
nixpacks build --help
|Specify the install command|
|Specify the build command|
|Specify the start command|
|Name for the built image|
|Provide environment variables to your build.|
|Provide additional Nix packages to install in the environment|
|Provide additional apt packages to install in the environment|
|Provide additional Nix libraries to install in the environment|
|Additional tags to add to the output image|
|Additional labels to add to the output image|
|Unique identifier to use for the build cache|
|Disable caching for the build|
|Specify host for Docker client|
|Specify if Docker client should verify the TLS (Transport Layer Security) certificates of the Docker daemon when communicating over a secure connection|
|Image to consider as cache sources|
|Enable writing cache metadata into the output image|
|Save output directory instead of building it with Docker|
|Choosing the target platform for the target environment|
|Location of the Nixpacks configuration file relative to the root of the app|
Environment variables can be provided in the format
FOO=bar. If no equal sign is present then the value is pulled from the current environment.
The plan command will show the full set of options (nix packages, build cmd, start cmd, etc) that will be used to when building the app. This plan can be saved and used to build the app with the same configuration at a future date.
nixpacks plan examples/node
By default, the plan is output in JSON format. You can output in TOML format with the
--format toml option.
View all plan options with
nixpacks plan --help
For a full list of CLI commands run