forked from SeleniumHQ/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
11 changed files
with
196 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-full-grid-nightly.yml up --force-recreate` | ||
# Add the `-d` flag at the end for detached execution | ||
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-full-grid-nightly.yml down` | ||
version: "3" | ||
services: | ||
selenium-event-bus: | ||
image: selenium/event-bus:nightly | ||
container_name: selenium-event-bus | ||
ports: | ||
- "4442:4442" | ||
- "4443:4443" | ||
- "5557:5557" | ||
|
||
selenium-sessions: | ||
image: selenium/sessions:nightly | ||
container_name: selenium-sessions | ||
ports: | ||
- "5556:5556" | ||
depends_on: | ||
- selenium-event-bus | ||
environment: | ||
- SE_EVENT_BUS_HOST=selenium-event-bus | ||
- SE_EVENT_BUS_PUBLISH_PORT=4442 | ||
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443 | ||
|
||
selenium-session-queue: | ||
image: selenium/session-queue:nightly | ||
container_name: selenium-session-queue | ||
ports: | ||
- "5559:5559" | ||
|
||
selenium-distributor: | ||
image: selenium/distributor:nightly | ||
container_name: selenium-distributor | ||
ports: | ||
- "5553:5553" | ||
depends_on: | ||
- selenium-event-bus | ||
- selenium-sessions | ||
- selenium-session-queue | ||
environment: | ||
- SE_EVENT_BUS_HOST=selenium-event-bus | ||
- SE_EVENT_BUS_PUBLISH_PORT=4442 | ||
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443 | ||
- SE_SESSIONS_MAP_HOST=selenium-sessions | ||
- SE_SESSIONS_MAP_PORT=5556 | ||
- SE_SESSION_QUEUE_HOST=selenium-session-queue | ||
- SE_SESSION_QUEUE_PORT=5559 | ||
|
||
selenium-router: | ||
image: selenium/router:nightly | ||
container_name: selenium-router | ||
ports: | ||
- "4444:4444" | ||
depends_on: | ||
- selenium-distributor | ||
- selenium-sessions | ||
- selenium-session-queue | ||
environment: | ||
- SE_DISTRIBUTOR_HOST=selenium-distributor | ||
- SE_DISTRIBUTOR_PORT=5553 | ||
- SE_SESSIONS_MAP_HOST=selenium-sessions | ||
- SE_SESSIONS_MAP_PORT=5556 | ||
- SE_SESSION_QUEUE_HOST=selenium-session-queue | ||
- SE_SESSION_QUEUE_PORT=5559 | ||
|
||
chrome: | ||
image: selenium/node-chrome:nightly | ||
shm_size: 2gb | ||
depends_on: | ||
- selenium-event-bus | ||
environment: | ||
- SE_EVENT_BUS_HOST=selenium-event-bus | ||
- SE_EVENT_BUS_PUBLISH_PORT=4442 | ||
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443 | ||
|
||
edge: | ||
image: selenium/node-edge:nightly | ||
shm_size: 2gb | ||
depends_on: | ||
- selenium-event-bus | ||
environment: | ||
- SE_EVENT_BUS_HOST=selenium-event-bus | ||
- SE_EVENT_BUS_PUBLISH_PORT=4442 | ||
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443 | ||
|
||
firefox: | ||
image: selenium/node-firefox:nightly | ||
shm_size: 2gb | ||
depends_on: | ||
- selenium-event-bus | ||
environment: | ||
- SE_EVENT_BUS_HOST=selenium-event-bus | ||
- SE_EVENT_BUS_PUBLISH_PORT=4442 | ||
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443 | ||
|
||
chrome_video: | ||
image: selenium/video:nightly | ||
volumes: | ||
- /tmp/videos:/videos | ||
depends_on: | ||
- chrome | ||
environment: | ||
- DISPLAY_CONTAINER_NAME=chrome | ||
- SE_NODE_GRID_URL=http://selenium-router:4444 | ||
- SE_VIDEO_FILE_NAME=auto | ||
|
||
edge_video: | ||
image: selenium/video:nightly | ||
volumes: | ||
- /tmp/videos:/videos | ||
depends_on: | ||
- edge | ||
environment: | ||
- DISPLAY_CONTAINER_NAME=edge | ||
- SE_NODE_GRID_URL=http://selenium-router:4444 | ||
- SE_VIDEO_FILE_NAME=auto | ||
|
||
firefox_video: | ||
image: selenium/video:nightly | ||
volumes: | ||
- /tmp/videos:/videos | ||
depends_on: | ||
- firefox | ||
environment: | ||
- DISPLAY_CONTAINER_NAME=firefox | ||
- SE_NODE_GRID_URL=http://selenium-router:4444 | ||
- SE_VIDEO_FILE_NAME=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
REQUIRED_VERSION="24.0.9" | ||
DOCKER_VERSION=$(docker --version | grep -oP '\d+\.\d+\.\d+') | ||
version_greater_equal() { | ||
[ "$1" = "$2" ] && return 0 | ||
local IFS=. | ||
local i ver1=($1) ver2=($2) | ||
for ((i=0; i<${#ver1[@]}; i++)); do | ||
[ -z "${ver2[i]}" ] && ver2[i]=0 | ||
((10#${ver1[i]} > 10#${ver2[i]})) && return 0 | ||
((10#${ver1[i]} < 10#${ver2[i]})) && return 1 | ||
done | ||
return 0 | ||
} | ||
if version_greater_equal "$DOCKER_VERSION" "$REQUIRED_VERSION"; then | ||
echo "Docker engine version is $DOCKER_VERSION" | ||
EXIT_CODE=0 | ||
else | ||
echo "Docker engine version is $DOCKER_VERSION, which does not meet the requirement." | ||
EXIT_CODE=1 | ||
fi | ||
|
||
DOCKER_CONFIG_FILE="/etc/docker/daemon.json" | ||
if [ ! -f "$DOCKER_CONFIG_FILE" ]; then | ||
echo "Docker configuration file not found at $DOCKER_CONFIG_FILE" | ||
EXIT_CODE=1 | ||
fi | ||
if cat "$DOCKER_CONFIG_FILE" | grep -q containerd; then | ||
echo "The containerd feature is enabled in Docker engine. $(cat $DOCKER_CONFIG_FILE)" | ||
else | ||
echo "The containerd feature is not enabled in Docker engine. $(cat $DOCKER_CONFIG_FILE)" | ||
EXIT_CODE=1 | ||
fi | ||
|
||
echo "===============================" | ||
if [ "$EXIT_CODE" -eq 1 ]; then | ||
echo "Check failed." | ||
echo "Please run the following command setup development environment: make setup_dev_env" | ||
exit $EXIT_CODE | ||
else | ||
echo "All checks passed." | ||
exit 0 | ||
fi |