Skip to content

Commit 5afc639

Browse files
fix: bind Java dedup socket directory in Docker
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
1 parent 6b3b2cb commit 5afc639

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

java-dedup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Run it with Docker Compose after the Maven package step has created `target/java
3535
docker compose up --build
3636
```
3737

38-
The image runs as a non-root user. For a more restricted container run with a read-only root filesystem, dropped capabilities, `no-new-privileges`, and a writable shared `/tmp` volume for Keploy's Unix sockets:
38+
The Compose app bind-mounts host `/tmp` into the container so Keploy and the Java SDK use the same Unix socket paths for `/tmp/coverage_control.sock` and `/tmp/coverage_data.sock`. The image runs as a non-root user. For a more restricted container run with a read-only root filesystem, dropped capabilities, `no-new-privileges`, and writable host `/tmp` bind-mounted for Keploy's Unix sockets:
3939

4040
```bash
4141
docker compose -f docker-compose.yml -f docker-compose.restricted.yml up --build

java-dedup/docker-compose.restricted.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
services:
22
java-dedup:
33
read_only: true
4-
volumes:
5-
- keploy-sockets-vol:/tmp
64
cap_drop:
75
- ALL
86
security_opt:

java-dedup/docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- "8080:8080"
1111
environment:
1212
KEPLOY_JAVA_CLASS_DIRS: /app/target/classes
13-
14-
volumes:
15-
keploy-sockets-vol:
13+
volumes:
14+
- type: bind
15+
source: /tmp
16+
target: /tmp

0 commit comments

Comments
 (0)