Skip to content

Commit a0b3840

Browse files
authored
Merge pull request #69 from mikesir87/68-move-port-republishing-functionality
Move host port republishing from separate service to support extension
2 parents a7b9875 + 83fbc11 commit a0b3840

File tree

15 files changed

+547
-1371
lines changed

15 files changed

+547
-1371
lines changed

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ flowchart TD
4747
subgraph VSCodeServer[VS Code Server container]
4848
project@{ shape: odd, label: "/home/coder/project" }
4949
socket@{ shape: odd, label: "/var/run/docker.sock" }
50-
51-
subgraph Shared Network Namespace
52-
PortRepublisher[Port republisher container]:::containerNode
53-
end
5450
end
5551
5652
VSCodeServer:::containerNode
@@ -60,8 +56,6 @@ flowchart TD
6056
Volume --> |Mounted into| Interface[Labspace interface]:::containerNode
6157
Volume --> |Mounted at| project
6258
63-
SocketVolume -->|Mounted into| PortRepublisher
64-
6559
HostProxy@{ shape: odd, label: "Host engine socket" } --> |Mounted into|ProxyContainer
6660
ProxyContainer[Socket Proxy]:::containerNode -->|Stores proxy-enabled socket into| SocketVolume@{ shape: cyl, label: "Docker socket\nvolume" }
6761
SocketVolume -->|Mounted at| socket
@@ -77,8 +71,9 @@ flowchart TD
7771
- Mounts in new containers are only allowed from within the project
7872
- Mount source paths are remapped to the volume the files are found in (even if using relative paths)
7973
- Requests to start a new container with the Docker socket will be remapped to use the proxied socket. This ensures Testcontainers config also uses the remapping, etc.
80-
- **Host Port Republisher** - this container runs in the same network namespace as the VS Code Server and watches for container start/stop events that have published ports. It then starts socat processes to allow the forwarding of localhost ports to the container.
81-
- Example: start a postgres container in the IDE terminal, publishing the port. With this, you can then connect to it using `psql -h localhost` without using host network mode (which isn't always available)
74+
- **VS Code extension** - a custom VS Code extension that provides additional support and functionality in the system, including:
75+
- Support the "Run" button from the interface to send commands to run in the terminal
76+
- Host port republisher - watches for containers that are publishing ports and sets up socat proxies to enable direct communication using localhost inside the environment
8277

8378
### Content architecture
8479

components/host-port-republisher/Dockerfile

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)