Skip to content

Commit 60ad27e

Browse files
authored
Update Video/Dockerfile with based image ffmpeg:6.0-alpine (#1981)
[deploy]
1 parent 01648f3 commit 60ad27e

File tree

6 files changed

+27
-37
lines changed

6 files changed

+27
-37
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BUILD_ARGS := $(BUILD_ARGS)
1111
MAJOR := $(word 1,$(subst ., ,$(TAG_VERSION)))
1212
MINOR := $(word 2,$(subst ., ,$(TAG_VERSION)))
1313
MAJOR_MINOR_PATCH := $(word 1,$(subst -, ,$(TAG_VERSION)))
14-
FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-4.3.1)
14+
FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-6.0)
1515

1616
all: hub \
1717
distributor \
@@ -357,9 +357,9 @@ test_video: video hub chrome firefox edge
357357
done
358358
# Using ffmpeg to verify file integrity
359359
# https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4
360-
docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log
361-
docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log
362-
docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log
360+
docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log
361+
docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log
362+
docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log
363363

364364
.PHONY: \
365365
all \

NodeDocker/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ configs = [
1414
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
1515
url = "http://127.0.0.1:2375"
1616
# Docker image used for video recording
17-
video-image = "selenium/video:ffmpeg-4.3.1-20231020"
17+
video-image = "selenium/video:ffmpeg-6.0-20231020"
1818

1919
# Uncomment the following section if you are running the node on a separate VM
2020
# Fill out the placeholders with appropriate values

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ ___
473473

474474
## Video recording
475475

476-
Tests execution can be recorded by using the `selenium/video:ffmpeg-4.3.1-20231020`
476+
Tests execution can be recorded by using the `selenium/video:ffmpeg-6.0-20231020`
477477
Docker image. One container is needed per each container where a browser is running. This means if you are
478478
running 5 Nodes/Standalone containers, you will need 5 video containers, the mapping is 1-1.
479479

@@ -500,7 +500,7 @@ This example shows how to start the containers manually:
500500
``` bash
501501
$ docker network create grid
502502
$ docker run -d -p 4444:4444 -p 6900:5900 --net grid --name selenium --shm-size="2g" selenium/standalone-chrome:4.14.1-20231020
503-
$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-4.3.1-20231020
503+
$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-6.0-20231020
504504
# Run your tests
505505
$ docker stop video && docker rm video
506506
$ docker stop selenium && docker rm selenium
@@ -547,7 +547,7 @@ configs = [
547547
# Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue.
548548
url = "http://127.0.0.1:2375"
549549
# Docker image used for video recording
550-
video-image = "selenium/video:ffmpeg-4.3.1-20231020"
550+
video-image = "selenium/video:ffmpeg-6.0-20231020"
551551

552552
# Uncomment the following section if you are running the node on a separate VM
553553
# Fill out the placeholders with appropriate values
@@ -678,7 +678,7 @@ configs = [
678678
# Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue.
679679
url = "http://127.0.0.1:2375"
680680
# Docker image used for video recording
681-
video-image = "selenium/video:ffmpeg-4.3.1-20231020"
681+
video-image = "selenium/video:ffmpeg-6.0-20231020"
682682
683683
# Uncomment the following section if you are running the node on a separate VM
684684
# Fill out the placeholders with appropriate values

Video/Dockerfile

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
1-
FROM jrottenberg/ffmpeg:4.3.1-ubuntu2004
1+
FROM jrottenberg/ffmpeg:6.0-alpine
22
LABEL authors="Selenium <selenium-developers@googlegroups.com>"
33

4-
#================================================
5-
# Customize sources for apt-get
6-
#================================================
7-
RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \
8-
&& echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \
9-
&& echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list
10-
11-
# No interactive frontend during docker build
12-
ENV DEBIAN_FRONTEND=noninteractive \
13-
DEBCONF_NONINTERACTIVE_SEEN=true
14-
154
#========================
165
# Supervisor
176
#========================
18-
RUN apt-get -qqy update \
19-
&& apt-get upgrade -yq \
20-
&& apt-get -qqy --no-install-recommends install \
21-
supervisor x11-xserver-utils x11-utils curl jq python3-pip \
22-
&& python3 -m pip install --upgrade pip \
23-
&& python3 -m pip install --upgrade setuptools \
24-
&& python3 -m pip install --upgrade wheel \
25-
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
7+
RUN apk update \
8+
&& apk upgrade \
9+
&& apk add --no-cache --update --virtual .build-deps supervisor bash curl jq xset python3 py3-psutil py3-pip \
10+
&& ln -sf python3 /usr/bin/python \
11+
&& rm -rf /tmp/* /var/cache/apk/*
12+
13+
ENV PYTHONUNBUFFERED=1
14+
RUN python3 -m pip install --no-cache --upgrade --no-cache-dir pip urllib3 setuptools requests wheel
2615

2716
#======================================
2817
# Add Supervisor configuration files
2918
#======================================
19+
ENV SE_VIDEO_FOLDER /videos
20+
RUN mkdir -p /opt/bin/
21+
RUN mkdir -p /var/run/supervisor /var/log/supervisor ${SE_VIDEO_FOLDER}
22+
3023
COPY supervisord.conf /etc
3124
COPY entry_point.sh video.sh video_ready.py /opt/bin/
32-
RUN cd /opt/bin && pip install psutil
33-
34-
RUN mkdir -p /var/run/supervisor /var/log/supervisor /videos
3525

26+
RUN chmod +x /opt/bin/*
3627
ENTRYPOINT ["/opt/bin/entry_point.sh"]
3728
CMD ["/opt/bin/entry_point.sh"]
3829

@@ -44,6 +35,5 @@ ENV SE_FRAME_RATE 15
4435
ENV SE_CODEC libx264
4536
ENV SE_PRESET "-preset ultrafast"
4637
ENV FILE_NAME video.mp4
47-
ENV SE_VIDEO_FOLDER /videos
4838

4939
EXPOSE 9000

docker-compose-v3-video.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
3535

3636
chrome_video:
37-
image: selenium/video:ffmpeg-4.3.1-20231020
37+
image: selenium/video:ffmpeg-6.0-20231020
3838
volumes:
3939
- /tmp/videos:/videos
4040
depends_on:
@@ -44,7 +44,7 @@ services:
4444
- FILE_NAME=chrome_video.mp4
4545

4646
edge_video:
47-
image: selenium/video:ffmpeg-4.3.1-20231020
47+
image: selenium/video:ffmpeg-6.0-20231020
4848
volumes:
4949
- /tmp/videos:/videos
5050
depends_on:
@@ -54,7 +54,7 @@ services:
5454
- FILE_NAME=edge_video.mp4
5555

5656
firefox_video:
57-
image: selenium/video:ffmpeg-4.3.1-20231020
57+
image: selenium/video:ffmpeg-6.0-20231020
5858
volumes:
5959
- /tmp/videos:/videos
6060
depends_on:

generate_release_notes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CHROMEDRIVER_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} chrom
1717
EDGEDRIVER_VERSION=$(docker run --rm selenium/node-edge:${TAG_VERSION} msedgedriver --version | awk '{print $4}')
1818
FIREFOX_VERSION=$(docker run --rm selenium/node-firefox:${TAG_VERSION} firefox --version | awk '{print $3}')
1919
GECKODRIVER_VERSION=$(docker run --rm selenium/node-firefox:${TAG_VERSION} geckodriver --version | awk 'NR==1{print $2}')
20-
FFMPEG_VERSION=$(docker run --entrypoint="" --rm selenium/video:ffmpeg-4.3.1-${BUILD_DATE} ffmpeg -version | awk '{print $3}' | head -n 1)
20+
FFMPEG_VERSION=$(docker run --entrypoint="" --rm selenium/video:ffmpeg-6.0-${BUILD_DATE} ffmpeg -version | awk '{print $3}' | head -n 1)
2121

2222

2323
echo "" >> release_notes.md

0 commit comments

Comments
 (0)