Comments (19)
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.
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.
Agree that this should actually be available on details view as well.
from portainer.
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.
are we having any update here?
from portainer.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Hi there @Leosirth there is already discussion for a feature that might introduce this functionality here: #2845
from portainer.
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.
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.
I would also love to see this feature. For me it would make documentation so much easier.
from portainer.
Aggreged this feature would be of grate help
from portainer.
Related Issues (20)
- incorrect I/O usage in container statistics page
- LDAP TLSCACert doesn't change with API
- 'Value must be between 0 and x' validation incorrectly shown when editing an application
- Add option to disable color codes in Portainer's logs
- Commands are echoed to container console on connection and may error
- Correct Published port URLs (including fixing https// colon cleansing)
- Detection of Kubernetes Up status does not work when considering pending actions
- Encrypted db is not saved as .edb in CE backup file
- Kubernetes Cluster Setup screen - ‘Ensure that your cloud provider…’ text is no longer on its own line
- Portainer license callback - Incorrect endpoint count when multiple endpoints deleted
- Swagger API documentation - add 409 response to /endpoints POST API endpoint
- When a Kubernetes environment's stacks functionality is off, the stack column should be hidden in the Apps table in Namespace Details and Node Details screens
- Create Namespace - Regression of special characters issue with Kubernetes labels
- Cannot create custom templates with human-readable names HOT 1
- Portainer Secrets cannot be found by Stack Compose File HOT 2
- Non-administrator users can't edit stack due to error: "Stack config file is invalid: open stack.env: no such file or directory." HOT 4
- stack deployment failure when using relative path HOT 2
- Recreating a container via webhook the ownership is reset to administrators
- Orphaned Stack visible for multiple agents
- Cannot decrypt portainer backup file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portainer.