dokku-pg-plugin icon indicating copy to clipboard operation
dokku-pg-plugin copied to clipboard

seems not working with docker 1.7

Open suppix opened this issue 9 years ago • 15 comments

dokku postgresql:create db Your docker version is too old, please update it

dokku postgresql:link web db docker: "inspect" requires a minimum of 1 argument. See 'docker inspect --help'.

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

suppix avatar Jun 25 '15 16:06 suppix

+1

Subtletree avatar Jun 26 '15 00:06 Subtletree

I have the same problem. It keep saying my docker version is too old, when i run "dokku postgresql:create appdb". This is the detail of installed docker:

Client version: 1.7.0 Client API version: 1.19 Go version (client): go1.4.2 Git commit (client): 0baf609 OS/Arch (client): linux/amd64 Server version: 1.7.0 Server API version: 1.19 Go version (server): go1.4.2 Git commit (server): 0baf609 OS/Arch (server): linux/amd64

dianseptiana avatar Jun 26 '15 12:06 dianseptiana

Same issue here!

masodev avatar Jun 27 '15 12:06 masodev

Same here. I have Docker 1.7.0

stephenbaidu avatar Jun 27 '15 12:06 stephenbaidu

According to the Docker release note (Jun 22), the volumes systems have been completely rewritten. After a shallow search, I realised /var/lib/docker/vfs/dir/ is no more. So I changed VOLUME_PATH=$(docker inspect $ID | grep /var/lib/docker/vfs/dir/ | awk '{print $2}' | sed -e's/"//g') to VOLUME_PATH=$(docker inspect $ID | grep /var/lib/docker/volumes | awk '{print $2}' | sed -e's/"//g')

And I get the following error

dokku postgresql:create myapp
docker: "inspect" requires a minimum of 1 argument.
See 'docker inspect --help'.

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image
json: cannot unmarshal array into Go value of type struct { NetworkSettings struct { Ports nat.PortMap } }
-----> Setting config vars
       DATABASE_URL: postgres://root:dCy8p6GLF5gCUl7K@:/db
-----> Restarting app myapp
App myapp has not been deployed

-----> myapp linked to postgresql/myapp database

-----> PostgreSQL container created: postgresql/myapp
docker: "inspect" requires a minimum of 1 argument.
See 'docker inspect --help'.

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image
json: cannot unmarshal array into Go value of type struct { NetworkSettings struct { Ports nat.PortMap } }

       Host: 
       Port: 
       User: 'root'
       Password: 'dCy8p6GLF5gCUl7K'
       Database: 'db'

       Url: 'postgres://root:dCy8p6GLF5gCUl7K@:/db'

stephenbaidu avatar Jun 27 '15 17:06 stephenbaidu

+1

kriskova avatar Jun 27 '15 18:06 kriskova

I was able to fix this at my end. I made two changes in the commands file. There has been a change in the volumes system, so I changed

VOLUME_PATH=$(docker inspect $ID | grep /var/lib/docker/vfs/dir/ | awk '{print $2}' | sed -e's/"//g')

to

VOLUME_PATH=$(docker inspect $ID | grep /var/lib/docker/volumes | awk '{print $2}' | sed -e's/"//g')

And since the created postgresql/$APP image does not have the latest tag added, I changed

function get_postgresql_id() {
    ID=$(docker ps | grep postgresql/"$APP":latest | awk {'print $1'})

to

function get_postgresql_id() {
    ID=$(docker ps | grep postgresql/"$APP" | awk {'print $1'})

This works for me for now.

stephenbaidu avatar Jun 27 '15 18:06 stephenbaidu

@stephenbaidu +1! Works for me! Thanks!

kriskova avatar Jun 27 '15 19:06 kriskova

+1 for integrating @stephenbaidu's patch

srigi avatar Jun 29 '15 07:06 srigi

You can also pull from my branch until it is merged. It incorporates @stephenbaidu's changes.

egerlach avatar Jul 01 '15 18:07 egerlach

:+1: for the fix from @stephenbaidu , thanks!

slava-vishnyakov avatar Jul 09 '15 00:07 slava-vishnyakov

It looks like this project is abandoned by original author. Can you suggest good alternative?

srigi avatar Jul 09 '15 07:07 srigi

Cool, @srigi did you find any?

dmr avatar Jul 30 '15 13:07 dmr

My issues were resolved after upgrading. Please refer to: https://github.com/Kloadut/dokku-pg-plugin/issues/76#issuecomment-124716847

masodev avatar Jul 30 '15 13:07 masodev

@dmr yes, I'm really happy with Flink/dokku-psql-single-container. Don't be scared that there isn't any link command. It will auto-link to app container with the same name.

srigi avatar Jul 31 '15 16:07 srigi