Skip to content

Commit

Permalink
JBR-6639 add packages required for JCEF tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avu authored and vprovodin committed Feb 15, 2024
1 parent 01af8d6 commit 99962f9
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 18 deletions.
54 changes: 41 additions & 13 deletions jb/project/docker/Dockerfile-xvfb
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,57 @@
# NB: this also means there may be no security-related fixes there, need to
# move the version to the next manually.

ARG ARCH
ARG ARCH_FROM
ARG ARCH=i386
ARG OS_NAME
ARG OS_VERSION

# jetbrains/runtime:jbrTest_${os_name}${os_version}-$arch
FROM ${ARCH}/${OS_NAME}:${OS_VERSION}
FROM ${ARCH_FROM}/${OS_NAME}:${OS_VERSION}

# Install the necessary build tools
RUN apt-get update -y; \
ARG ARCH
RUN \
if [ "$ARCH" = "i386" ]; then \
echo Installing packages required for i386 only; \
dpkg --add-architecture i386; \
apt-get update -y; \
apt-get install -y \
libc6:i386 \
libncurses5 libncurses5:i386 \
libstdc++6:i386 \
zlib1g:i386; \
else \
echo Skipping the step installing packages specific for the platform; \
fi; \
apt-get update -y; \
apt-get install -y \
fontconfig \
libgtk2.0-0 \
libxext6 \
libxi6 \
libxrender-dev \
libxtst6 \
xvfb \
x11-apps;\
apt-get clean all
libgtk2.0-0:${ARCH} \
libxext6:${ARCH} \
libxi6:${ARCH} \
libxrender-dev:${ARCH} \
libxtst6:${ARCH} \
xvfb:${ARCH} \
libnss3:${ARCH} \
libatk-bridge2.0-0:${ARCH} \
libgbm1:${ARCH} \
libxkbcommon0:${ARCH} \
libasound2:${ARCH};\
apt-get clean all

ENV DISPLAY=:0

ADD run_xvfb.sh /run_xvfb.sh
RUN chmod a+x /run_xvfb.sh
CMD /run_xvfb.sh

# fontconfig:i386 \
# x11-apps:i386; \


# apt-get install -y \
# libgtk2.0-0${LIB_ARCH_POSTFIX}\
# libxext6${LIB_ARCH_POSTFIX} \
# libxi6${LIB_ARCH_POSTFIX} \
# libxrender-dev${LIB_ARCH_POSTFIX} \
# libxtst6${LIB_ARCH_POSTFIX} \
# xvfb${LIB_ARCH_POSTFIX}; \
21 changes: 16 additions & 5 deletions jb/project/docker/mkdocker_xvfb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,34 @@ set -x

machine=$(uname -m)

echo "Building image for "$machine" arch"

case "$machine" in
"aarch64" | "arm64v8" | "arm64")
arch=arm64v8
;;
"x86_64" | "amd64")
arch=amd64""
arch=amd64
;;
esac
arch_from=$arch


# This script creates Docker images for testing JBR executables


function build {
arch=$1
os_name=$2
os_version=$3
local arch=$1
local os_name=$2
local os_version=$3
local arch_from=${4:-$arch}

echo "Building image for ${os_name} ${os_version} ${arch}"
echo "====================================="

docker build -t jetbrains/runtime:jbrTest_${os_name}${os_version}-$arch \
--build-arg ARCH=$arch \
--build-arg ARCH="$arch" \
--build-arg ARCH_FROM=$arch_from \
--build-arg OS_NAME=${os_name} \
--build-arg OS_VERSION="${os_version}" \
-f Dockerfile-xvfb .
Expand All @@ -33,4 +41,7 @@ function build {
}

build $arch "ubuntu" "20.04"
if [ "$arch" == "amd64" ]; then
build "i386" "ubuntu" "20.04" $arch
fi
build $arch "ubuntu" "22.04"

0 comments on commit 99962f9

Please sign in to comment.