Skip to content

Commit b2d09a6

Browse files
committed
add Docker network configuration to GitHub Actions workflow
1 parent 2c41c42 commit b2d09a6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/main.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,11 @@ jobs:
4141
run: docker rm -f springboot-fitness-tracking-app-container
4242

4343
- name: Run Docker Container
44-
run: docker run -d -p 8080:8080 --restart always --name springboot-fitness-tracking-app-container subproblem/fitness-tracking-app:latest
44+
run: |
45+
docker network create mynetwork
46+
docker run -d \
47+
-p 8080:8080 \
48+
--restart always \
49+
--name springboot-fitness-tracking-app-container \
50+
--network mynetwork \ # Connect container to specified Docker network
51+
subproblem/fitness-tracking-app:latest

0 commit comments

Comments
 (0)