pre-receive hook declined on Dokku image

Posted September 21, 2014 7.5k views

Hi all,

I can’t seem to use the Dokku image provided by DigitalOcean (Dokku v0.2.3 on Ubuntu 14.04 w/ Docker 1.1.2).

Seems to fail with the sample app, steps to reproduce are:

  1. Create new droplet with my SSH key (1gb ram / 1cpu - $10/m)
  2. Go to {mydomain}.com and see the Dokku setup screen
  3. Tick “use virtual naming for apps”
  4. Hit [finish setup]
  5. Clone the heroku nodejs sample app locally
  6. Run git remote add production dokku@{mydomain}.com:node-js-app
  7. run git push production master

And I get:

Counting objects: 378, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (304/304), done.
Writing objects: 100% (378/378), 209.95 KiB | 0 bytes/s, done.
Total 378 (delta 45), reused 378 (delta 45)
remote: -----> Cleaning up ...
remote: -----> Building node-js-app ...
remote: Cloning into '/tmp/tmp.vfvhbuvQct'...
remote: warning: You appear to have cloned an empty repository.
remote: done.
remote: HEAD is now at 97a7c5c... wording
remote:        Node.js app detected
To dokku@{mydomain}:node-js-app
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@{mydomain}.com:node-js-app'

Any ideas?

Sneaky Edit: I found a post here telling me to run a command to fix the config of docker but is still not working.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

The step dokku is failing at is the buildstep, a separate script, not dokku itself. Try follow these instructions to upgrade it:

I’ve seen the same thing. It seems to be affected by enabling IPv6 on the droplet. If I start a new droplet with IPv6 disabled, it works.