Skip to content

Commit 7d9889b

Browse files
committed
Build FFmpeg and optimize video container
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 6dc901e commit 7d9889b

File tree

26 files changed

+230
-229
lines changed

26 files changed

+230
-229
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
if: github.event.inputs.skip-build-push-image != 'true'
122122
uses: nick-invision/retry@master
123123
with:
124-
timeout_minutes: 90
124+
timeout_minutes: 180
125125
max_attempts: 3
126126
retry_wait_seconds: 60
127127
command: PLATFORMS="${PLATFORMS}" VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make build

.github/workflows/docker-test.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,11 @@ jobs:
128128
uses: nick-invision/retry@master
129129
if: matrix.build-all == true
130130
with:
131-
timeout_minutes: 20
131+
timeout_minutes: 60
132132
max_attempts: 3
133133
retry_wait_seconds: 60
134134
command: |
135135
VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
136-
- name: Pre-build to reduce logs in test phase
137-
uses: nick-invision/retry@master
138-
if: matrix.build-all != true
139-
with:
140-
timeout_minutes: 30
141-
max_attempts: 3
142-
retry_wait_seconds: 60
143-
command: |
144-
VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make hub
145-
VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chrome
146-
VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make firefox
147-
VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make edge
148136
- name: Set test parameters
149137
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
150138
run: |
@@ -158,7 +146,7 @@ jobs:
158146
- name: Run Docker Compose to ${{ matrix.test-strategy }}
159147
uses: nick-invision/retry@master
160148
with:
161-
timeout_minutes: 40
149+
timeout_minutes: 120
162150
max_attempts: 2
163151
retry_wait_seconds: 60
164152
command: |

.github/workflows/helm-chart-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
- name: Build Docker images
155155
uses: nick-invision/retry@master
156156
with:
157-
timeout_minutes: 12
157+
timeout_minutes: 60
158158
max_attempts: 3
159159
retry_wait_seconds: 60
160160
command: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
- name: Build images
8484
uses: nick-invision/retry@master
8585
with:
86-
timeout_minutes: 90
86+
timeout_minutes: 180
8787
max_attempts: 3
8888
retry_wait_seconds: 60
8989
command: PLATFORMS="${PLATFORMS}" VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make build

Base/Dockerfile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ ENV DEBIAN_FRONTEND=noninteractive \
3333
SEL_GID=${GID} \
3434
HOME=${HOME} \
3535
TZ=${TZ} \
36-
SEL_DOWNLOAD_DIR=${HOME}/Downloads
36+
SEL_DOWNLOAD_DIR=${HOME}/Downloads \
37+
VIDEO_FOLDER="/videos"
3738

3839
#========================
3940
# Miscellaneous packages
4041
# Includes minimal runtime used for executing non GUI Java programs
4142
#========================
42-
RUN --mount=type=secret,id=SEL_PASSWD \
43-
if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
43+
RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
4444
echo "deb http://archive.ubuntu.com/ubuntu noble main universe\n" > /etc/apt/sources.list \
4545
&& echo "deb http://archive.ubuntu.com/ubuntu noble-updates main universe\n" >> /etc/apt/sources.list \
4646
&& echo "deb http://security.ubuntu.com/ubuntu noble-security main universe\n" >> /etc/apt/sources.list ; \
@@ -61,8 +61,10 @@ RUN --mount=type=secret,id=SEL_PASSWD \
6161
gnupg2 \
6262
libnss3-tools \
6363
python3-pip \
64-
openjdk-${JRE_VERSION}-jre-headless \
65-
&& if [ "${TARGETARCH}" = "arm" ] && [ "${TARGETVARIANT}" = "v7" ]; then \
64+
python3-psutil \
65+
openjdk-${JRE_VERSION}-jre-headless
66+
RUN --mount=type=secret,id=SEL_PASSWD \
67+
if [ "${TARGETARCH}" = "arm" ] && [ "${TARGETVARIANT}" = "v7" ]; then \
6668
export ARCH=armhf ; \
6769
else \
6870
export ARCH=$(dpkg --print-architecture) ; \
@@ -93,18 +95,18 @@ RUN --mount=type=secret,id=SEL_PASSWD \
9395
# Selenium & relaxing permissions for OpenShift and other non-sudo environments
9496
#==========
9597
&& mkdir -p /opt/selenium /opt/selenium/assets /opt/selenium/secrets /var/run/supervisor /var/log/supervisor ${SEL_DOWNLOAD_DIR} \
96-
${HOME}/.mozilla ${HOME}/.vnc ${HOME}/.pki/nssdb \
98+
${HOME}/.mozilla ${HOME}/.vnc ${HOME}/.pki/nssdb ${VIDEO_FOLDER} \
9799
# NSSDB initialization with an empty password
98100
&& certutil -d sql:${HOME}/.pki/nssdb -N --empty-password \
99101
&& touch /opt/selenium/config.toml \
100-
&& chown -R ${SEL_USER}:${SEL_GROUP} /opt/selenium /var/run/supervisor /var/log/supervisor /etc/passwd ${HOME} \
101-
&& chmod -R 775 /opt/selenium /var/run/supervisor /var/log/supervisor /etc/passwd ${HOME} \
102+
&& chown -R ${SEL_USER}:${SEL_GROUP} /opt/selenium /var/run/supervisor /var/log/supervisor /etc/passwd ${HOME} ${VIDEO_FOLDER} \
103+
&& chmod -R 775 /opt/selenium /var/run/supervisor /var/log/supervisor /etc/passwd ${HOME} ${VIDEO_FOLDER} \
102104
&& wget --no-verbose https://github.com/${AUTHORS}/selenium/releases/download/${RELEASE}/selenium-server-${VERSION}.jar \
103105
-O /opt/selenium/selenium-server.jar \
104-
&& chgrp -R 0 /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
105-
&& chmod -R g=u /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
106-
&& setfacl -Rm u:${SEL_USER}:rwx /opt /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
107-
&& setfacl -Rm g:${SEL_GROUP}:rwx /opt /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
106+
&& chgrp -R 0 /opt/selenium ${HOME} ${VIDEO_FOLDER} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
107+
&& chmod -R g=u /opt/selenium ${HOME} ${VIDEO_FOLDER} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
108+
&& setfacl -Rm u:${SEL_USER}:rwx /opt /opt/selenium ${HOME} ${VIDEO_FOLDER} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
109+
&& setfacl -Rm g:${SEL_GROUP}:rwx /opt /opt/selenium ${HOME} ${VIDEO_FOLDER} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
108110
#=====
109111
# Download observability related OpenTelemetry jars and make them available in a separate directory
110112
# so that the container can skip downloading them everytime it comes up

0 commit comments

Comments
 (0)