Update openvidu-test-e2e image to Ubuntu 22.04

pull/765/head
pabloFuente 2022-11-22 15:08:05 +01:00
parent f728dd848a
commit 01e5a492c4
4 changed files with 13 additions and 75 deletions

View File

@ -16,7 +16,7 @@ on:
TEST_IMAGE:
description: 'Docker image where to run the tests'
required: true
default: 'openvidu/openvidu-test-e2e:focal'
default: 'openvidu/openvidu-test-e2e:22.04'
KURENTO_MEDIA_SERVER_IMAGE:
description: 'Docker image of kurento-media-server'
required: true
@ -53,7 +53,7 @@ jobs:
main:
runs-on: ubuntu-latest
container:
image: ${{ github.event.inputs.TEST_IMAGE || 'openvidu/openvidu-test-e2e:focal' }}
image: ${{ github.event.inputs.TEST_IMAGE || 'openvidu/openvidu-test-e2e:22.04' }}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/openvidu:/opt/openvidu

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL maintainer="info@openvidu.io"
@ -8,14 +8,17 @@ RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y \
software-properties-common \
apt-transport-https \
rsync \
ca-certificates \
curl \
gnupg \
lsb-release && \
lsb-release \
iproute2 && \
apt-get install -y --no-install-recommends apt-utils
# Install Node
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
# Java 11
RUN apt-get install -y openjdk-11-jdk-headless
@ -36,15 +39,10 @@ RUN apt-get -y install sudo
RUN apt-get install -y ffmpeg
# docker
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io
# docker-compose
RUN apt-get update && apt-get install docker-compose-plugin && \
curl -fL https://github.com/docker/compose-switch/releases/latest/download/docker-compose-linux-amd64 -o /usr/local/bin/compose-switch && \
chmod +x /usr/local/bin/compose-switch && \
update-alternatives --install /usr/local/bin/docker-compose docker-compose /usr/local/bin/compose-switch 99
RUN sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Cleanup
RUN rm -rf /var/lib/apt/lists/*

View File

@ -1,60 +0,0 @@
#!/bin/bash
docker run -d --name chrome-iptables -p 4444:4444 -p 6080:6080 -p 5900:5900 --cap-add=SYS_ADMIN --cap-add=NET_ADMIN elastestbrowsers/chrome:latest
sleep 3
docker exec -i chrome-iptables bash <<'EOF'
sudo apt-get -y update && sudo apt-get -y install iptables && sudo apt-get -y install terminator && sudo apt-get -y install lsof
# UDP rules (DROP all)
sudo iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 4444 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 6080 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 5900 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 4200 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 4443 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 3478 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 443 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 4444 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 6080 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 5900 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 4200 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 4443 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 3478 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 53 -j ACCEPT
sudo iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT
sudo iptables -A OUTPUT -p udp --sport 53 -j ACCEPT
sudo iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
sudo iptables -A INPUT -p tcp --sport 53 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 53 -j ACCEPT
sudo iptables -A INPUT -p udp --sport 53 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 53 -j ACCEPT
sudo iptables -A OUTPUT -p tcp -j DROP
sudo iptables -A OUTPUT -p udp --dport 0:65535 -j DROP
sudo iptables -A INPUT -p udp --dport 0:65535 -j DROP
exit
EOF
# sudo iptables -L --line-numbers
# sudo iptables -D INPUT 1
# sudo iptables -D OUTPUT 1
# turnadmin -l -N "ip=127.0.0.1 dbname=0 password=turn connect_timeout=30"
# turnadmin -a -u USER -r openvidu -p PASS -N "ip=127.0.0.1 dbname=0 password=turn connect_timeout=30"
# turnadmin -d -u USER -r openvidu -N "ip=127.0.0.1 dbname=0 password=turn connect_timeout=30"
# google-chrome -start-maximized -disable-infobars -no-first-run -ignore-certificate-errors -use-fake-device-for-media-stream -use-fake-ui-for-media-stream

View File

@ -1 +1 @@
docker build --rm --pull --no-cache -t openvidu/openvidu-test-e2e:focal -f Dockerfile .
docker build --rm --pull --no-cache -t openvidu/openvidu-test-e2e:22.04 -f Dockerfile .