• 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
  TOSILOCK for CONTAINER COswald 3 2,156 July-13th-2021, 11:32 AM
Last Post: Armin@netPI
  Access to RTC from my own container application tad 1 3,493 March-19th-2021, 02:58 PM
Last Post: Armin@netPI
  2 MAC addresses for fieldbus RJ45 ports tad 2 2,075 March-11th-2021, 01:17 PM
Last Post: tad
  [SOLVED] Starting services/commands/scripts at startup of a container Jonas.Sellmann@outlook.de 9 5,906 March-9th-2021, 08:47 AM
Last Post: WalterSchaefer
  OpenVPN container Armin@netPI 0 1,597 January-3rd-2021, 12:13 PM
Last Post: Armin@netPI
  operating Console of a container on netPI connected to Wi-Fi tethering tad 3 2,578 December-3rd-2020, 12:32 PM
Last Post: tad
  NIOT-E-NPIX-4DI4DO with netpi-netx container WalterSchaefer 3 6,366 November-25th-2020, 01:06 PM
Last Post: zen89
  NPIX-4DI4DO and NetPi-Nodered container issues alhammi 4 7,456 November-16th-2020, 01:35 PM
Last Post: alhammi
  Get host MAC via REST API inside container bschandra 4 3,603 November-16th-2020, 09:26 AM
Last Post: bschandra
  Fieldbus Ports not working Schoko 13 8,424 June-29th-2020, 09:43 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)