Bug 41062 - Support params in the "docker create" call
Support params in the "docker create" call
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P1 enhancement (vote)
: UCS 4.1-1-errata
Assigned To: Dirk Wiesenthal
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-15 12:23 CEST by Dirk Wiesenthal
Modified: 2016-04-27 17:32 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2016-04-15 12:23:53 CEST
When a Docker App is installed, a docker container is created via
  docker create ...

Adapting the parameters of this call is somewhat limited.

You have influence on "-e" (env variables), "-p" (ports), "-v" (volumes).

To support --mac-address, --net and so on we should support a generic mechanism:

ucr get appcenter/apps/$app/docker/startparams=...

should be included in the docker create call. The variable can then be set by the preinst script of the corresponding App.
Comment 1 Dirk Wiesenthal univentionstaff 2016-04-25 12:22:48 CEST
Called it
  appcenter/apps/$app/docker/params
in
  univention-appcenter 5.0.20-47.160.201604251220

E.g.
  ucr set appcenter/apps/%(app_name)s/docker/params="-e FOO=bar --net=host"

They can be set in the preinst and change the docker create call.

Test: 80_docker/54_app_preinst
Comment 2 Florian Best univentionstaff 2016-04-26 08:56:40 CEST
This causes a forever hanging process if the variable is unset.

Because shlex.split(None) waits for stdin.
Comment 3 Dirk Wiesenthal univentionstaff 2016-04-26 11:03:49 CEST
Fixed in
  univention-appcenter 5.0.20-48.161.201604261100
Comment 4 Florian Best univentionstaff 2016-04-27 11:06:36 CEST
OK: the parameter does only work during docker image creation (=app installation or app upgrade).
OK: --mac-address works
Comment 5 Janek Walkenhorst univentionstaff 2016-04-27 17:32:36 CEST
<http://errata.software-univention.de/ucs/4.1/157.html>