webgui icon indicating copy to clipboard operation
webgui copied to clipboard

[Docker][Advanced] Support parsing Docker run / Docker compose's service syntax for creating templates

Open andrebrait opened this issue 6 months ago • 2 comments

Essentially, I'd like to be able to create (or even maintain/edit, maybe?) container templates using either the docker run command and/or the docker compose service syntax. That would to more easily create templates and edit them by hand rather than dealing with the UI.

Originally posted by @luzfcb in https://github.com/unraid/webgui/issues/1813#issuecomment-2272397605

I don't know if it's the same thing as you thought, but I like OpenWRT's luci-app-dockerman option:

It has an option called Resolve CLI You click on it, paste the docker create or docker run command, and then submit it to the backend, the backend parses the command, and the page/form reloads with all fields filled

step1:

image

step2:

image

step3

All fields was filled and you are able to customize mode before creating the container

image

The most logic is implemented in Lua https://github.com/lisaac/luci-app-dockerman/blob/7292955a1b415bb60fa2e403bb3a437b4b7f7846/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua#L63C1-L363C4

andrebrait avatar Aug 07 '24 05:08 andrebrait