• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Modifying ports after container is being added.
#1
Do you know of a way to modify the ports after I’ve added the container? I need to add a port, but don’t want to redo the process.
  Reply
#2
Hello Steve,

this is a feature that is not supported by Docker in general. It is not something netPI specific.

See the docker run... command reference here https://docs.docker.com/engine/reference/run/ which is called internally when you click to add container in the web GUI.

But I have a tip for you. When you click to the name of the the existing container in the containers overview page and you click to create then the GUI will generate you an image copy of the container as it is. Then afterwards you can start this image again as a container and make correct port settings to your demands. Of course you should stop the other origin container before, else previous ports are occupied.

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
In other words, you can go into Docker>Containers. Click on the checkbox of your original container (make sure it is the only one checked) and click Stop. Click on the name (not the checkbox) of your container that you are talking about. After the “Container details” page opens, go down to “Create image” and click on the blue Create button. Click on Images on the left side bar and verify that a new image was created (probably at the bottom of the list with no Tag). Copy the Id to the clipboard.
Go to Containers on the left side bar. Click on +Add container. Name the container. Paste the Id of the image into Image. Turn off Always pull the image button. Continue to create the container as you did on your previous container entering all of the necessary information, but put in the correct port(s) that you want to use (if you are going to use the previous ones they also have to be entered). When all information is done, click Start container. Go back to Containers on the left side bar. Make sure all checkboxes are Unchecked. Check the box on your new container and click Start.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Fieldbus Ports not working Schoko 7 45 October-29th-2019, 08:59 AM
Last Post: Armin@netPI
  [SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container Christian_Rau 6 88 October-21st-2019, 10:30 AM
Last Post: Armin@netPI
  Cannot start container Magnus 7 34 October-16th-2019, 01:00 PM
Last Post: Armin@netPI
  Generate VLAN interfaces in container FrankJacob 7 44 September-26th-2019, 03:19 PM
Last Post: Armin@netPI
  create container in Portainer v1.12.4 dcatteeu 2 23 September-9th-2019, 12:12 PM
Last Post: dcatteeu
  UMTS/LTE support via USB router/modem sticks in a container Armin@netPI 3 153 September-5th-2019, 02:07 PM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 0 23 August-23rd-2019, 10:39 AM
Last Post: Armin@netPI
  Ready-to-deploy: full featured Node-RED container Armin@netPI 5 77 July-25th-2019, 06:16 AM
Last Post: Armin@netPI
  Modbus TCP Connection via RTE Ethernet Ports Flo_Lo 18 481 April-15th-2019, 09:50 PM
Last Post: Armin@netPI
  New Container example "OPC UA server" Armin@netPI 0 17 April-12th-2019, 11:51 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)