netCommonsEU / cDistro

CloudyWeb GUI (2017)
http://cloudy.community
GNU General Public License v2.0
0 stars 0 forks source link

"Docker FORM" generates configuration files in wrong location and format (commit 8ffd754) #1

Open nfunitn opened 6 years ago

nfunitn commented 6 years ago

Cloudy saves new Docker images configuration files in the wrong location and with the wrong format when the "Docker FORM" ("Enterprise cloud" -> "Docker FORM") is used for configuring a new Docker image.

For example, if I fill the fields of "Docker FORM" with the following values:

Name: PeerStreamer-ng Command: docker -d --net host nfunitn/peerstreamer:latest Port: 3000 Image: nfunitn/peerstreamer:latest Publich: No

what happens is that Cloudy saves the new configuration file in: /var/local/cDistro/plug/resources/docker/containers/nfunitn/peerstreamer:latest

Instead, the right location should be something like /var/local/cDistro/plug/resources/docker/containers/PeerStreamer-ng_latest.json

Moreover, the configuration file format is the one used by the old version of Cloudy that apparently is not compatible with the latest version. This is for example the content of the configuration file produced by Cloudy:

Name=PeerStreamer-ng Run=docker run -d --net host nfunitn/peerstreamer:latest Port=3000 Img=nfunitn/peerstreamer:latest Pub=No Id-ndef

Instead, in order to have the PeerStreamer docker image working in Cloudy, the content of the configuration file should be something like the following:

{ "appname": "PeerStreamer-ng", "description": "P2P live video streaming", "image": "--net host nfunitn/peerstreamer:latest", "name": "peerstreamer" }

felixfreitag commented 6 years ago

The Docker form is not sufficently flexible to cover the variety of specifications, so it is not updated anymore.

You need to add the entry manually in the folder: /var/local/cDistro/plug/resources/docker/containers/

cat PeerStreamer-ng_latest.json { "appname": "PeerStreamer-ng", "description": "P2P video-streaming application", "image": "nfunitn/peerstreamer:latest", "ports": { "3000": "3000" } }