Skip to content

Tar and Zip Archives

Initializing an app repository from an archive file


Introduced in 0.24.0

A Dokku app repository can be initialized or updated from the contents of an archive file via the git:from-archive command. This is an excellent way of tracking changes when deploying pre-built binary archives, such as java jars or go binaries. This can also be useful when deploying directly from a GitHub repository at a specific commit.

dokku git:from-archive node-js-app

In the above example, Dokku will build the app as if the repository contained the extracted contents of the specified archive file.

Triggering a build with the same archive file multiple times will result in Dokku exiting 0 early as there will be no changes detected.

The git:from-archive command can optionally take a git and argument (in that order) to customize the author. If the arguments are left empty, they will fallback to Dokku and, respectively.

dokku git:from-archive node-js-app "Camila" ""

The default archive type is always set to .tar. To use a different archive type, specify the --archive-type flag. Failure to do so will result in a failure to extract the archive.

dokku git:from-archive --archive-type zip node-js-app "Camila" ""

Finally, if the archive url is specified as --, the archive will be fetched from stdin.

curl -sSL | dokku git:from-archive node-js-app  --