dyson / dokku-docker-options Goto Github PK
View Code? Open in Web Editor NEWSet docker options for dokku (https://github.com/progrium/dokku)
License: MIT License
Set docker options for dokku (https://github.com/progrium/dokku)
License: MIT License
Using latest dokku and docker. Trying to link running dokku RethinkDB instance to a second node.js app, which points to my root domain -> mydomain.com. Link parameter is correctly retrieved from DOCKER_OPTIONS file but isn't passed on to docker, as can be seen in the following dokku trace:
++ pluginhook docker-args mydomain.com
++ :
++ cat
+ STDIN=
+ APP=mydomain.com
+ DOCKER_OPTIONS_FILE=DOCKER_OPTIONS
+ DOCKER_OPTIONS_FILE_PATH=/home/dokku/mydomain.com/DOCKER_OPTIONS
+ output=
+ [[ -f /home/dokku/mydomain.com/DOCKER_OPTIONS ]]
+ read line
+ output=' -link rethinkdb_api:RETHINKDB'
+ read line
+ echo ' -link rethinkdb_api:RETHINKDB'
+ APP=mydomain.com
+ CONTAINER_NAME=rethinkdb_mydomain.com
+ VOLUME_DIR=/home/dokku/mydomain.com/rethinkdb
+ [[ -d /home/dokku/mydomain.com/rethinkdb ]]
+ DOCKER_ARGS=
++ docker run -d -p 5000 -e PORT=5000 app/mydomain.com /bin/bash -c '/start web'
+ id=85e8fe645f2182cf2c9bcd2967c35b77f261d7d3445578476df7fdc0056a5b98
+ echo 85e8fe645f2182cf2c9bcd2967c35b77f261d7d3445578476df7fdc0056a5b98
++ docker port 85e8fe645f2182cf2c9bcd2967c35b77f261d7d3445578476df7fdc0056a5b98 5000
Examinig DOCKER_OPTIONS file:
cat -E DOCKER_OPTIONS
...will print:
-link rethinkdb_api:RETHINKDB$
Here's my list of dokku plugins:
/var/lib/dokku/plugins/00_dokku-standard/
/var/lib/dokku/plugins/backup/
/var/lib/dokku/plugins/config/
/var/lib/dokku/plugins/docker-options/
/var/lib/dokku/plugins/dokku-rebuild/
/var/lib/dokku/plugins/dokku-supervisord/
/var/lib/dokku/plugins/domains-plugin/
/var/lib/dokku/plugins/git/
/var/lib/dokku/plugins/nginx-vhosts/
/var/lib/dokku/plugins/rethinkdb/
A simple test that demonstrates that RethinkDB links should work:
sudo docker run -t -i -link rethinkdb_api:RETHINKDB ubuntu bash
env
...will correctly print RethinkDB env vars.
After building a container with a bind name server in it, I can open up ports with:
dokku docker-options:add bind '--publish=53:53/udp --publish=53:53 --publish=953:953'
however, after doing this, a dokku rebuild (or git deploy) fails:
Successfully built 66411ee1e17a
-----> Deploying bind ...
-----> Shutting down old containers
time="2015-02-08T15:21:14+01:00" level="fatal" msg="Error response from daemon: Cannot start container 745b78958dcf9964a74b02763a4ede525d86958c5a3581404f29a0762a0b1691: (exit status 1)"
removing the options allows me to rebuild, and I can then re-add the options.
I haven't fully understood why this is happening, but I suspect it's necessary to have separate build options and run options. Or maybe it's the shutdown options that need some special handling.
I'm not sure if it matters, but I'm running dokku-alt rather than the original dokku.
Installed the latest version of dokku, added dokku-docker-options, and noticed the following:
$ ssh -t [email protected] docker-options:add myapp '-v /srv/myapp:/app/media'
Connection to dev.example.tld closed.
$ ssh -t [email protected] docker-options myapp
-v
Connection to dev.example.tld closed.
Would you be okay with us adding this as an official plugin in an upcoming release?
Hi,
First off, thanks for creating the plugin.
I've been trying to use this with dokku, however, the -v option seems to interfere with the build process from buildpack. I found a similar issue here with your other plugin (that's resolved now) dokku/dokku#906
The error I see when deploying is the same rm: cannot remove '/app/data': Device or resource busy
. However, it works fine with the persistent storage plugin.
Thanks,
Daniel
Am I completely misunderstanding the docs?
This is my command: dokku docker-options:add myapp "-link my-other-app:some-alias"
?
It returns: "Phase(s) must be one of [build deploy run]"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.