Bjonness406 Posted May 9, 2016 Share Posted May 9, 2016 Is it possible to make your own/add some commands to the docker run command? I need this for a docker on docker hub created by another person. Link to comment
Squid Posted May 9, 2016 Share Posted May 9, 2016 Is it possible to make your own/add some commands to the docker run command? I need this for a docker on docker hub created by another person. Use the extra parameters section Link to comment
Bjonness406 Posted May 9, 2016 Author Share Posted May 9, 2016 Is it possible to make your own/add some commands to the docker run command? I need this for a docker on docker hub created by another person. Use the extra parameters section Then I get a error message... Link to comment
saarg Posted May 9, 2016 Share Posted May 9, 2016 Is it possible to make your own/add some commands to the docker run command? I need this for a docker on docker hub created by another person. Use the extra parameters section Then I get a error message... Then you might have an error in your command. What command are we talking about? Link to comment
Squid Posted May 9, 2016 Share Posted May 9, 2016 Is it possible to make your own/add some commands to the docker run command? I need this for a docker on docker hub created by another person. Use the extra parameters section Then I get a error message... A little bit more detail would be good - like a screen shot of the docker run command Link to comment
Bjonness406 Posted May 9, 2016 Author Share Posted May 9, 2016 Can post screenshot tomorrow, but here is the error message "flag provided but not defined: --licence-key" Full command: "run -d --name="amp" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -p 25570:25565/tcp -v "/mnt/cache/appdata/amp/":"/ampdata":rw --licence-key xxxxxxx-xxxxx-xxxx-xxxxx-xxxxx othrayte/amp" What I am supposed to run, and is working fine on windows-docker toolbox docker run -p 8080:8080 -p 25565:25565 othrayte/amp Minecraft --licence-key your-licence-key-xxxx Made a thread about it yesterday, but I got not response so I thought I did something wrong. http://lime-technology.com/forum/index.php?topic=48964.0 Link to comment
Squid Posted May 9, 2016 Share Posted May 9, 2016 Can post screenshot tomorrow, but here is the error message "flag provided but not defined: --licence-key" Full command: "run -d --name="amp" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -p 25570:25565/tcp -v "/mnt/cache/appdata/amp/":"/ampdata":rw --licence-key xxxxxxx-xxxxx-xxxx-xxxxx-xxxxx othrayte/amp" What I am supposed to run, and is working fine on windows-docker toolbox docker run -p 8080:8080 -p 25565:25565 othrayte/amp Minecraft --licence-key your-licence-key-xxxx Made a thread about it yesterday, but I got not response so I thought I did something wrong. http://lime-technology.com/forum/index.php?topic=48964.0 Yeah I looked at that yesterday. Docker run as with unRaid does support the --licence-key so not quite sure what's up with that, and didn't see any mention of it anywhere in the docker docs either Link to comment
saarg Posted May 9, 2016 Share Posted May 9, 2016 Can post screenshot tomorrow, but here is the error message "flag provided but not defined: --licence-key" Full command: "run -d --name="amp" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -p 25570:25565/tcp -v "/mnt/cache/appdata/amp/":"/ampdata":rw --licence-key xxxxxxx-xxxxx-xxxx-xxxxx-xxxxx othrayte/amp" What I am supposed to run, and is working fine on windows-docker toolbox docker run -p 8080:8080 -p 25565:25565 othrayte/amp Minecraft --licence-key your-licence-key-xxxx Made a thread about it yesterday, but I got not response so I thought I did something wrong. http://lime-technology.com/forum/index.php?topic=48964.0 Add it after the repository in the docker template. That should work. The extra parameter field gets added before the repository and that is why it doesn't work. Not sure if it's past through as an environment variable when added after the repository. Nice auto correct tomotorsflyet Link to comment
Bjonness406 Posted May 9, 2016 Author Share Posted May 9, 2016 Can post screenshot tomorrow, but here is the error message "flag provided but not defined: --licence-key" Full command: "run -d --name="amp" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -p 25570:25565/tcp -v "/mnt/cache/appdata/amp/":"/ampdata":rw --licence-key xxxxxxx-xxxxx-xxxx-xxxxx-xxxxx othrayte/amp" What I am supposed to run, and is working fine on windows-docker toolbox docker run -p 8080:8080 -p 25565:25565 othrayte/amp Minecraft --licence-key your-licence-key-xxxx Made a thread about it yesterday, but I got not response so I thought I did something wrong. http://lime-technology.com/forum/index.php?topic=48964.0 Add it after the repository in the docker template. That should work. The extra parameter field gets added before the repository and that is why it doesn't work. Not sure if it's past through as an environment variable when added after the repository. Nice auto correct tomotorsflyet Will try that tomorrow Haha I should stop typing english on my iPad... or change the language to english on it, I have to change every Second line now.. Link to comment
saarg Posted May 9, 2016 Share Posted May 9, 2016 Can post screenshot tomorrow, but here is the error message "flag provided but not defined: --licence-key" Full command: "run -d --name="amp" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -p 25570:25565/tcp -v "/mnt/cache/appdata/amp/":"/ampdata":rw --licence-key xxxxxxx-xxxxx-xxxx-xxxxx-xxxxx othrayte/amp" What I am supposed to run, and is working fine on windows-docker toolbox docker run -p 8080:8080 -p 25565:25565 othrayte/amp Minecraft --licence-key your-licence-key-xxxx Made a thread about it yesterday, but I got not response so I thought I did something wrong. http://lime-technology.com/forum/index.php?topic=48964.0 Add it after the repository in the docker template. That should work. The extra parameter field gets added before the repository and that is why it doesn't work. Not sure if it's past through as an environment variable when added after the repository. Nice auto correct tomotorsflyet Will try that tomorrow Haha I should stop typing english on my iPad... or change the language to english on it, I have to change every Second line now.. You can't have two keyboard languages on the ipad and just switch it quickly with a button? I'm not surprised it can't be done though Link to comment
aptalca Posted May 9, 2016 Share Posted May 9, 2016 Can post screenshot tomorrow, but here is the error message "flag provided but not defined: --licence-key" Full command: "run -d --name="amp" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -p 25570:25565/tcp -v "/mnt/cache/appdata/amp/":"/ampdata":rw --licence-key xxxxxxx-xxxxx-xxxx-xxxxx-xxxxx othrayte/amp" What I am supposed to run, and is working fine on windows-docker toolbox docker run -p 8080:8080 -p 25565:25565 othrayte/amp Minecraft --licence-key your-licence-key-xxxx Made a thread about it yesterday, but I got not response so I thought I did something wrong. http://lime-technology.com/forum/index.php?topic=48964.0 Minecraft --license-key are what you're supposed to run in the container after it is started. So they should come "after" the othrayte/amp, not before. If before, docker will treat them as variables used in container creation, which they are not and hence the error Link to comment
Bjonness406 Posted May 10, 2016 Author Share Posted May 10, 2016 Nope, it was added after: https://github.com/bjonness406/Dev-Templates/blob/master/amp.xml Link to comment
saarg Posted May 10, 2016 Share Posted May 10, 2016 Nope, it was added after: https://github.com/bjonness406/Dev-Templates/blob/master/amp.xml The extraparams tag is always inserted before the repository when dockerman starts the container. Add it after othrayte/amp in the repository tag and it should work. Link to comment
Bjonness406 Posted May 10, 2016 Author Share Posted May 10, 2016 Nope, it was added after: https://github.com/bjonness406/Dev-Templates/blob/master/amp.xml The extraparams tag is always inserted before the repository when dockerman starts the container. Add it after othrayte/amp in the repository tag and it should work. Like this you mean? <Repository>othrayte/amp - - licence-key</Repository> Link to comment
saarg Posted May 10, 2016 Share Posted May 10, 2016 Yes. But try it in the container gui template in unraid first. Much faster than doing it on github. Link to comment
Bjonness406 Posted May 10, 2016 Author Share Posted May 10, 2016 Yes. But try it in the container gui template in unraid first. Much faster than doing it on github. Not working Link to comment
saarg Posted May 10, 2016 Share Posted May 10, 2016 Yes. But try it in the container gui template in unraid first. Much faster than doing it on github. Not working Error message? Link to comment
Bjonness406 Posted May 10, 2016 Author Share Posted May 10, 2016 Yes. But try it in the container gui template in unraid first. Much faster than doing it on github. Not working Error message? No error message, that is why I did not include it. Docker just instantly stops without even writing anything to the log root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name="Bjonness406-AMP" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -v "/mnt/cache/appdata/amp2/":"/ampdata":rw othrayte/amp --licence-key xxxxxxx-xxxxxx-xxxxxxx-xxxxxxxxxxxx ca5fcf8c098e5289cc1eb3f2cfede9728f855c1f421fad6e174c2d415a4bbbbb The command finished successfully! Link to comment
saarg Posted May 10, 2016 Share Posted May 10, 2016 You forgot Minecraft before --licence. Link to comment
Bjonness406 Posted May 10, 2016 Author Share Posted May 10, 2016 You forgot Minecraft before --licence. Yes I did, everything working now! What is the point with Extra parameters if it dosen't work like it should? If I try to add Minecraft before --Licence-key on parameters, it just created a orphan image.. (Yes I have updated webui for 6.1.9, this is another thing) Unable to find image 'Minecraft:latest' locally Invalid repository name (Minecraft), only [a-z0-9-_.] are allowed The command finished successfully! Link to comment
BRiT Posted May 10, 2016 Share Posted May 10, 2016 You forgot Minecraft before --licence. Yes I did, everything working now! What is the point with Extra parameters if it dosen't work like it should? If I try to add Minecraft before --Licence-key on parameters, it just created a orphan image.. (Yes I have updated webui for 6.1.9, this is another thing) Unable to find image 'Minecraft:latest' locally Invalid repository name (Minecraft), only [a-z0-9-_.] are allowed The command finished successfully! Extra parameters to Docker not the docker container. Such docker extra parameters are for setting ip or dns level parameters. Link to comment
Bjonness406 Posted May 10, 2016 Author Share Posted May 10, 2016 You forgot Minecraft before --licence. Yes I did, everything working now! What is the point with Extra parameters if it dosen't work like it should? If I try to add Minecraft before --Licence-key on parameters, it just created a orphan image.. (Yes I have updated webui for 6.1.9, this is another thing) Unable to find image 'Minecraft:latest' locally Invalid repository name (Minecraft), only [a-z0-9-_.] are allowed The command finished successfully! Extra parameters to Docker not the docker container. Such docker extra parameters are for setting ip or dns level parameters. Ah, then I understand. Is there not any other way than the one saarg said to add extra parameters to a docker? There is many dockers with extra parameters. Link to comment
aptalca Posted May 10, 2016 Share Posted May 10, 2016 You forgot Minecraft before --licence. Yes I did, everything working now! What is the point with Extra parameters if it dosen't work like it should? If I try to add Minecraft before --Licence-key on parameters, it just created a orphan image.. (Yes I have updated webui for 6.1.9, this is another thing) Unable to find image 'Minecraft:latest' locally Invalid repository name (Minecraft), only [a-z0-9-_.] are allowed The command finished successfully! Extra parameters to Docker not the docker container. Such docker extra parameters are for setting ip or dns level parameters. Ah, then I understand. Is there not any other way than the one saarg said to add extra parameters to a docker? There is many dockers with extra parameters. Those parameters should be coded into the container's dockerfiles. Likely as environment variables. So you pass the environment variable in the xml, which is set when the container is created and the container uses that variable once it is running Link to comment
Bjonness406 Posted May 10, 2016 Author Share Posted May 10, 2016 Those parameters should be coded into the container's dockerfiles. Likely as environment variables. So you pass the environment variable in the xml, which is set when the container is created and the container uses that variable once it is running They should, but if I use another ones docker, I don't want to ask him "Hey, could you change you perfectly working docker to use environment variable instead , so I could use it on unraid".. There should really be an option for extra docker container parameters. Then unraid's docker support would be more flexible since you can use another ones docker, and just create a template file. Link to comment
Bjonness406 Posted May 11, 2016 Author Share Posted May 11, 2016 Well, I need a bit more help The full command to the docker is docker run -p 8080:8080 -p 25565:25565 othrayte/amp Minecraft --licence-key your-licence-key-xxxx +MinecraftModule.Minecraft.PortNumber 25565 The "Minecraft --licence-key your-licence-key-xxxx" part works fine, but then I add "+MinecraftModule.Minecraft.PortNumber 25565", the docker command becomes: run -d --name="Bjonness406-AMP" --net="bridge" -e TZ="Europe/Berlin" -p 8100:8080/tcp -p 25570:25565/tcp -v "/mnt/cache/appdata/amp2/":"/ampdata":rw othrayte/amp Minecraft --licence-key your-licence-key-xxxx MinecraftModule.Minecraft.PortNumber 25565 So it is running without the "+" and the docker will not start, instead I get this line in the docker log: Unknown option MinecraftModule.Minecraft.PortNumber Any idea on this? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.