Adding/rename Container Name with VS Code Torizon Extension

Hey there,
we have a problem when assigning a container name with the VS Code Extension. If we assign a name under “extraparams” with the call “name”, this is not applied. Furthermore, we would be interested in how you can assign static IP addresses for your containers with the extension.

Can someone help?

1 Like

Hi @billi1234

We don’t have support for renaming the containers in the IDE itself. We use the auto-generated names as part of the control flow in our IDE backend. That said, when you are done with development, you will normally execute the “Torizon: export docker-compose” command and you can edit the container name directly in the docker.compose.yml file. Will that work or do you have a use case we should consider?

Regarding IP addresses, I’m not quite sure what your goal is. Can you explain your networking setup and why it doesn’t work with the auto-assigned addresses? You can specify the network to attach to the container using the “networks” configuration similar to volumes and such but you will need to manually create them from the command line on your board before trying to launch your application.

Drew

Hi @drew.tx

Thanks!

  1. ok, we will check this!
  2. We have to Containers for our GUI. One with the Backend and another with the UI. They will comunication with IPC over tcp. Our idea was now to use our own network for this communication. However, this did not work. We suspect it is because the backend container (Torizon container) is still in the host network. The frontend (UI container) could not communicate with the backend container, because of the Containername(Hostname) could not get dissolved. It will work with the Container ID or with the IP-Adress. But they still chanig every time we reboot, arent they ? Therefore we would prefer to give our container a fixed IP address.

Thanks!

The names of each container should be resolvable within the container. When the docker-compose file includes multiple services, it sets up name resolution automatically. Using the autogenerated names will be tricky if they change but when you create the custom docker-compose file and explicitly name the container you should not need IP addresses.

Please let me know if you see different behavior.

Drew

1 Like