Update Python to 3.8 in Docker

This commit is contained in:
Ilya Fedin 2022-11-23 21:10:44 +04:00 committed by John Preston
parent 1e6937a075
commit 5df4dd36a7
5 changed files with 10 additions and 13 deletions

View File

@ -51,7 +51,7 @@ jobs:
defaults:
run:
shell: scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- bash --noprofile --norc -eo pipefail {0}
shell: scl enable rh-python38 -- scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- bash --noprofile --norc -eo pipefail {0}
strategy:
matrix:

View File

@ -15,10 +15,6 @@ if [ ! -d "$FullScriptPath/../../../../DesktopPrivate" ]; then
exit
fi
Run () {
scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- "$@"
}
HomePath="$FullScriptPath/../.."
cd $HomePath
@ -30,10 +26,10 @@ if [ ! -f "/usr/bin/cmake" ]; then
ln -s cmake3 /usr/bin/cmake
fi
Run ./configure.sh
./configure.sh
cd $ProjectPath
Run cmake --build . --config Release --target Telegram
cmake --build . --config Release --target Telegram
cd $ReleasePath
echo "$BinaryName build complete!"

View File

@ -21,7 +21,7 @@ ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/loc
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm \
&& yum -y install centos-release-scl \
&& yum -y install git python3-pip autoconf automake libtool patch \
&& yum -y install git rh-python38-python-pip autoconf automake libtool patch \
fontconfig-devel freetype-devel libX11-devel at-spi2-core-devel alsa-lib-devel \
pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel mesa-libgbm-devel \
libdrm-devel vulkan-devel gtk3-devel \
@ -31,15 +31,15 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
llvm-toolset-7.0-llvm-devel \
&& yum clean all
RUN python3 -m pip install meson ninja
# Fix a bug with argument naming in CentOS 7 glibc
RUN sed -i 's/char \*__block/char */' /usr/include/unistd.h
SHELL [ "bash", "-c", ". /opt/rh/devtoolset-10/enable; exec bash -c \"$@\"", "-s"]
SHELL [ "bash", "-c", ". /opt/rh/rh-python38/enable; . /opt/rh/devtoolset-10/enable; exec bash -c \"$@\"", "-s"]
WORKDIR {{ LibrariesPath }}
RUN python3 -m pip install meson ninja
RUN mkdir /opt/cmake \
&& curl -sSLo {{ CMAKE_FILE }} {{ GIT }}/Kitware/CMake/releases/download/v{{ CMAKE_VER }}/{{ CMAKE_FILE }} \
&& sh {{ CMAKE_FILE }} --prefix=/opt/cmake --skip-license \
@ -825,4 +825,5 @@ COPY --link --from=webrtc_debug {{ LibrariesPath }}/tg_owt/out/Debug tg_owt/out/
WORKDIR ../tdesktop
VOLUME [ "/usr/src/tdesktop" ]
ENTRYPOINT [ "scl", "enable", "rh-python38", "--", "scl", "enable", "llvm-toolset-7.0", "--", "scl", "enable", "devtoolset-10", "--" ]
CMD [ "/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh" ]

View File

@ -1,4 +1,4 @@
#!/usr/bin/scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- bash
#!/bin/bash
cd Telegram
./configure.sh "$@"

View File

@ -15,7 +15,7 @@ fi
Command="$1"
if [ "$Command" == "" ]; then
Command="scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- bash"
Command="bash"
fi
docker run -it --rm --cpus=8 --memory=22g -v $HOME/Telegram/DesktopPrivate:/usr/src/DesktopPrivate -v $HOME/Telegram/tdesktop:/usr/src/tdesktop tdesktop:centos_env $Command