Skip to content

Commit

Permalink
Update Docker testing setup for firewalld
Browse files Browse the repository at this point in the history
The Docker testing environment for firewalld has been updated. The test-firewalld.yml workflow was changed to run the Docker container with systemd initialization and wait for the container to fully initialize before running the tests. Furthermore, the Dockerfile.firewalld was modified with the removal of the ENTRYPOINT directive.
  • Loading branch information
dvershinin committed Jul 11, 2024
1 parent 7b7d581 commit 2b59198
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test-firewalld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@ jobs:
- name: Run tests
run: |
docker run --init --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:ro my-firewalld-image bash -c "./firewalld-tests.sh"
# Run the container with systemd initialization
docker run --privileged --name firewalld-container -d -v /sys/fs/cgroup:/sys/fs/cgroup:ro my-firewalld-image /usr/sbin/init
# Wait for the container to be fully initialized
sleep 10
# Run tests inside the container
docker exec -it firewalld-container /bin/bash -c "./firewalld-tests.sh"
2 changes: 0 additions & 2 deletions Dockerfile.firewalld
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,4 @@ RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == system

VOLUME [ "/sys/fs/cgroup" ]

ENTRYPOINT ["/lib/systemd/systemd"]

CMD ["/sbin/init"]

0 comments on commit 2b59198

Please sign in to comment.