GithubHelp home page GithubHelp logo

CLI preview about portainer HOT 19 CLOSED

portainer avatar portainer commented on April 28, 2024 24
CLI preview

from portainer.

Comments (19)

Redsandro avatar Redsandro commented on April 28, 2024 13

This feature should extend to currently running containers that may or may not have been created/started with portainer. A command line that recreates the current container exactly (e.g. including volume mapping).

It would be nice to to have a button called "show command line" on the overview page with the start/stop buttons that shows a simple dialog with a "copy to clipboard" button that has the following text:

docker run  \
	-d \
	--name <name> \
	-p <port1> \
	-p <port2> \
	-e <environment1> \
	-e <environment2> \
	-v <volume1> \
	-v <volume2> \
	<image>;

from portainer.

weendigo avatar weendigo commented on April 28, 2024 10

This would be helpful to me in case of running same containers on multiple machines.
Or as it happened to me already, I've set up a container and forgot how...
I'm not really a Docker expert so I'd appreciate having a visual clue here.

from portainer.

deviantony avatar deviantony commented on April 28, 2024 5

Agree that this should actually be available on details view as well.

from portainer.

NemesisRE avatar NemesisRE commented on April 28, 2024 4

I would love that feature.
I had a problem while recreating a container within portainer but the old container was already deleted so all my settings were lost. With that feature one could actually backup the configuration.
Additionally it would help to update the portainer container itself.

from portainer.

horacecar avatar horacecar commented on April 28, 2024 4

are we having any update here?

from portainer.

deviantony avatar deviantony commented on April 28, 2024 3

We should put a button next to create/cancel in the container creation view to retrieve the current form result as a docker command in the pastebin.

from portainer.

beruic avatar beruic commented on April 28, 2024 2

There is a stackoverflow question on this matter: https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container/32774347

Essentially it should be doable by running

$ docker run -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike YOUR-CONTAINER

Just tried it out. It does add some extra stuff, but that is easily removable.

from portainer.

shalak avatar shalak commented on April 28, 2024 2

This feature would be great for educational and README-creating purposes. I can configure the container completely in Portainer, then copy-paste the exact command someone else needs to start the container on their own.

from portainer.

gauteg avatar gauteg commented on April 28, 2024 1

Not to mention that this feature would be a easy way to upgrade the docker container with the running portainer inside it :)
(I am of course open to a update feature I have totally missed...)

from portainer.

byteduty avatar byteduty commented on April 28, 2024 1

I agree with the above comments. This seems a major hole in functionality. It's a real headache when your trying to migrate persistent docker containers between systems, etc. All the information is available.

from portainer.

mikhail-gaponov avatar mikhail-gaponov commented on April 28, 2024

I vote for this feature too.
My use case here is to run specific configuration command for container (with currently mapped volumes). By default, this container starts the service (UpSource, to be clear), but when I need to reconfigure base URL, I have to restart this container with specific command and it would be nice to have the whole docker command for CLI.
Another case is to run container with the same configuration on particular environment (not managed by current Portainer installation)

from portainer.

foundObjects avatar foundObjects commented on April 28, 2024

I'd very much like to see this feature implemented as well. It would make re-creating containers on other machines not managed by portainer significantly easier.

from portainer.

Roemer avatar Roemer commented on April 28, 2024

That feature would be great. I had several problems (mostly with instable network connections) where re-create failed but the old container got deleted. Having this feature I could just copy the generated command line as fallback if portainers re-create fails.

from portainer.

Leosirth avatar Leosirth commented on April 28, 2024

Hi,

I don't know if feasible, but having also an option to "export" a container configuration as a docker compose file (even if not started with a compose itself) would be great.

I have several old container created without a compose file that would like to migrate/backup and this feature would came in hand.

Thanks and regards,

from portainer.

 avatar commented on April 28, 2024

Hi there @Leosirth there is already discussion for a feature that might introduce this functionality here: #2845

from portainer.

mariyam-portainer avatar mariyam-portainer commented on April 28, 2024

These are really great points and thanks taking the time to mention them. This is something we will need to discuss and work out.

from portainer.

ozdeadmeat avatar ozdeadmeat commented on April 28, 2024

The ability to export a container configuration that has been modified in portainer is a massive hole in portainers capability. Especially for non-experts who are trying to learn docker and use portainer.

Please provide us the ability to export the config either from portainer itself or from the CLI please.

from portainer.

36grad avatar 36grad commented on April 28, 2024

I would also love to see this feature. For me it would make documentation so much easier.

from portainer.

sindri121 avatar sindri121 commented on April 28, 2024

Aggreged this feature would be of grate help

from portainer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.