Skip to content

Commit 436bd77

Browse files
committed
[build][docs]: update docker-compose to docker compose
Following: https://github.blog/changelog/2024-04-10-github-hosted-runner-images-deprecation-notice-docker-compose-v1/ - Docker Compose v1 has been deprecated Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent 12eb550 commit 436bd77

21 files changed

+52
-49
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ body:
2525
description: |
2626
What command do you use to start Selenium Grid with Docker (or Kubernetes)?
2727
placeholder: |
28-
Please share the script or docker-compose file used. This will be automatically
28+
Please share the script or docker compose file used. This will be automatically
2929
formatted into code, so no need for backticks.
3030
If Kubernetes used, please share the YAML file, or chart values used to deploy the cluster.
3131
Be sure to include an SSCCE (Short, Self Contained, Correct
@@ -64,6 +64,6 @@ body:
6464
attributes:
6565
label: Selenium Grid chart version (chart version)
6666
description: What version of Selenium Grid chart are you using?
67-
placeholder: 0.26.2?
67+
placeholder: 0.29.1?
6868
validations:
6969
required: false

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,13 @@ test_parallel: hub chrome firefox edge
398398
echo NODE=$$node >> .env ; \
399399
echo UID=$$(id -u) >> .env ; \
400400
echo BINDING_VERSION=$(BINDING_VERSION) >> .env ; \
401-
docker-compose -f docker-compose-v3-test-parallel.yml up --no-log-prefix --exit-code-from tests --build ; \
401+
docker compose -f docker-compose-v3-test-parallel.yml up --no-log-prefix --exit-code-from tests --build ; \
402402
done
403403

404404
# This should run on its own CI job. There is no need to combine it with the other tests.
405405
# Its main purpose is to check that a video file was generated.
406406
test_video: video hub chrome firefox edge
407-
# Running a few tests with docker-compose to generate the videos
407+
# Running a few tests with docker compose to generate the videos
408408
rm -rf ./tests/videos; mkdir -p ./tests/videos
409409
for node in NodeChrome NodeFirefox NodeEdge ; do \
410410
cd ./tests || true ; \
@@ -425,7 +425,7 @@ test_video: video hub chrome firefox edge
425425
echo BROWSER=firefox >> .env ; \
426426
echo VIDEO_FILE_NAME=firefox_video.mp4 >> .env ; \
427427
fi ; \
428-
docker-compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit --build ; \
428+
docker compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit --build ; \
429429
done
430430
# Using ffmpeg to verify file integrity
431431
# https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4
@@ -435,6 +435,7 @@ test_video: video hub chrome firefox edge
435435

436436
test_node_docker: hub standalone_docker standalone_chrome standalone_firefox standalone_edge video
437437
rm -rf ./tests/videos; mkdir -p ./tests/videos
438+
sudo chmod 777 ./tests/videos
438439
for node in DeploymentAutoscaling JobAutoscaling ; do \
439440
cd tests || true ; \
440441
echo NAMESPACE=$(NAME) > .env ; \
@@ -449,7 +450,7 @@ test_node_docker: hub standalone_docker standalone_chrome standalone_firefox sta
449450
echo BINDING_VERSION=$(BINDING_VERSION) >> .env ; \
450451
export $$(cat .env | xargs) ; \
451452
envsubst < config.toml > ./videos/config.toml ; \
452-
docker-compose -f docker-compose-v3-test-node-docker.yaml up --no-log-prefix --exit-code-from tests --build ; \
453+
docker compose -f docker-compose-v3-test-node-docker.yaml up --no-log-prefix --exit-code-from tests --build ; \
453454
if [ $$? -ne 0 ]; then exit 1; fi ; \
454455
done
455456

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ $ docker run --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium/standalon
183183

184184
**docker-compose-v3-beta-channel.yml:**
185185
```bash
186-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-beta-channel.yml up`
186+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-beta-channel.yml up`
187187
# Add the `-d` flag at the end for detached execution
188-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-beta-channel.yml down`
188+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-beta-channel.yml down`
189189
version: "3"
190190
services:
191191
chrome:
@@ -229,9 +229,9 @@ services:
229229

230230
**docker-compose-v3-dev-channel.yml:**
231231
```bash
232-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-dev-channel.yml up`
232+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-dev-channel.yml up`
233233
# Add the `-d` flag at the end for detached execution
234-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-dev-channel.yml down`
234+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-dev-channel.yml down`
235235
version: "3"
236236
services:
237237
chrome:
@@ -484,7 +484,7 @@ linked resources below, save them locally and check the execution instructions o
484484
##### Version 3
485485
[`docker-compose-v3.yml`](docker-compose-v3.yml)
486486

487-
To stop the Grid and cleanup the created containers, run `docker-compose down`.
487+
To stop the Grid and cleanup the created containers, run `docker compose down`.
488488

489489
##### Version 3 with Swarm support
490490
[`docker-compose-v3-swarm.yml`](docker-compose-v3-swarm.yml)
@@ -494,7 +494,7 @@ ___
494494
### Fully distributed mode - Router, Queue, Distributor, EventBus, SessionMap and Nodes
495495

496496
It is possible to start a Selenium Grid with all its components apart. For simplicity, only an
497-
example with docker-compose will be provided. Save the file locally, and check the execution
497+
example with docker compose will be provided. Save the file locally, and check the execution
498498
instructions on top of it.
499499

500500
[`docker-compose-v3-full-grid.yml`](docker-compose-v3-full-grid.yml)
@@ -515,7 +515,7 @@ Docker image. One container is needed per each container where a browser is runn
515515
running 5 Nodes/Standalone containers, you will need 5 video containers, the mapping is 1-1.
516516

517517
Currently, the only way to do this mapping is manually (either starting the containers manually or through
518-
`docker-compose`). We are iterating on this process and probably this setup will be more simple in the future.
518+
`docker compose`). We are iterating on this process and probably this setup will be more simple in the future.
519519

520520
The video Docker image we provide is based on the ffmpeg Ubuntu image provided by the
521521
[jrottenberg/ffmpeg](https://github.com/jrottenberg/ffmpeg) project, thank you for providing this image and
@@ -1345,7 +1345,7 @@ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \
13451345
selenium/node-firefox:4.19.1-20240402
13461346
```
13471347

1348-
You can also refer to the below docker-compose yaml files to be able to start a simple grid (or) a dynamic grid.
1348+
You can also refer to the below docker compose yaml files to be able to start a simple grid (or) a dynamic grid.
13491349

13501350
* Simple Grid [v3 yaml file](docker-compose-v3-tracing.yml)
13511351
* Simple Grid [v2 yaml file](docker-compose-v2-tracing.yml)

docker-compose-v2-tracing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v2-tracing.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v2-tracing.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v2-tracing.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v2-tracing.yml down`
44
version: '2'
55
services:
66
jaeger:

docker-compose-v2.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v2.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v2.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v2.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v2.yml down`
44
version: '2'
55
services:
66
chrome:

docker-compose-v3-basicauth.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-basicauth.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-basicauth.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-basicauth.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-basicauth.yml down`
44
version: "3"
55
services:
66
chrome:

docker-compose-v3-beta-channel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-beta-channel.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-beta-channel.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-beta-channel.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-beta-channel.yml down`
44
version: "3"
55
services:
66
chrome:

docker-compose-v3-dev-channel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-dev-channel.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-dev-channel.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-dev-channel.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-dev-channel.yml down`
44
version: "3"
55
services:
66
chrome:

docker-compose-v3-dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-dev.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-dev.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-dev.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-dev.yml down`
44
version: "3"
55
services:
66
chrome:

docker-compose-v3-dynamic-grid.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-dynamic-grid.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-dynamic-grid.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-dynamic-grid.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-dynamic-grid.yml down`
44
version: "3"
55
services:
66
node-docker:

docker-compose-v3-full-grid-dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-full-grid-dev.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-full-grid-dev.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-full-grid-dev.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-full-grid-dev.yml down`
44
version: "3"
55
services:
66
selenium-event-bus:

docker-compose-v3-full-grid-tracing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-full-grid-tracing.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-full-grid-tracing.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-full-grid-tracing.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-full-grid-tracing.yml down`
44
version: "3"
55
services:
66
jaeger:

docker-compose-v3-full-grid.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-full-grid.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-full-grid.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-full-grid.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-full-grid.yml down`
44
version: "3"
55
services:
66
selenium-event-bus:
@@ -92,4 +92,4 @@ services:
9292
environment:
9393
- SE_EVENT_BUS_HOST=selenium-event-bus
9494
- SE_EVENT_BUS_PUBLISH_PORT=4442
95-
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
95+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443

docker-compose-v3-tracing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-tracing.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-tracing.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-tracing.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-tracing.yml down`
44
version: "3"
55
services:
66
jaeger:

docker-compose-v3-video-upload.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-video-upload.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-video-upload.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-video-upload.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-video-upload.yml down`
44
# ${variable_pattern} get value from .env in the same directory
55
version: "3"
66
services:

docker-compose-v3-video.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3-video.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3-video.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3-video.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3-video.yml down`
44
version: "3"
55
services:
66
chrome:

docker-compose-v3.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3.yml up`
1+
# To execute this docker compose yml file use `docker compose -f docker-compose-v3.yml up`
22
# Add the `-d` flag at the end for detached execution
3-
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3.yml down`
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-v3.yml down`
44
version: "3"
55
services:
66
chrome:

tests/docker-compose-v3-test-node-docker.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: "3"
22
services:
33
node-docker:
44
image: ${NAMESPACE}/node-docker:${TAG}
5+
user: root
56
volumes:
67
- ./videos:/opt/selenium/assets
78
- ./videos/config.toml:/opt/bin/config.toml
@@ -17,6 +18,7 @@ services:
1718

1819
selenium-hub:
1920
image: ${NAMESPACE}/hub:${TAG}
21+
user: ${UID}
2022
container_name: selenium-hub
2123
environment:
2224
- SE_LOG_LEVEL=${LOG_LEVEL}

tests/docker-compose-v3-test-parallel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to run this?
2-
# docker-compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit --build
3-
# To clean up, `docker-compose -f docker-compose-v3-test-video.yml down`
2+
# docker compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit --build
3+
# To clean up, `docker compose -f docker-compose-v3-test-video.yml down`
44
version: "3"
55
services:
66
chrome:

tests/docker-compose-v3-test-video.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to run this?
2-
# docker-compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit --build
3-
# To clean up, `docker-compose -f docker-compose-v3-test-video.yml down`
2+
# docker compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit --build
3+
# To clean up, `docker compose -f docker-compose-v3-test-video.yml down`
44
version: "3"
55
services:
66
browser:

tests/test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def standalone_browser_container_matches(container):
185185
# Flag for failure (for posterity)
186186
failed = False
187187

188-
# Avoiding to start the containers when running inside docker-compose
188+
# Avoiding to start the containers when running inside docker compose
189189
test_container_id = ''
190190
hub_id = ''
191191
if not run_in_docker_compose:
@@ -240,7 +240,7 @@ def standalone_browser_container_matches(container):
240240
logger.fatal(e)
241241
failed = True
242242

243-
# Avoiding a container cleanup if tests run inside docker-compose
243+
# Avoiding a container cleanup if tests run inside docker compose
244244
if not run_in_docker_compose:
245245
logger.info("Cleaning up...")
246246

0 commit comments

Comments
 (0)