Skip to content

Commit 846691a

Browse files
Resolve almalinux8/ubuntu2004 build image ppc64le compatibility issues (#4514)
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent 121a6ed commit 846691a

3 files changed

+9
-8
lines changed

docker/ci/config/gh-setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function gh_install_ppc64le {
2727
GO_VERSION=`go version | cut -d ' ' -f3 | tr -d 'go'`
2828
GO_REQUIRED_VERSION="1.21.0"
2929
COMPARE_VERSION=`echo $GO_REQUIRED_VERSION $GO_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1`
30-
if [ "$COMPARE_VERSION" != "$GCC_REQUIRED_VERSION" ]; then
30+
if [ "$COMPARE_VERSION" != "$GO_REQUIRED_VERSION" ]; then
3131
VERSION=2.32.1
3232
echo "go version on this env is older than $GO_REQUIRED_VERSION, use gh $VERSION"
3333
fi

docker/ci/dockerfiles/current/build.almalinux8.opensearch-dashboards.x64.arm64.dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ RUN dnf clean all && dnf install -y 'dnf-command(config-manager)' && \
2424
dnf update -y && \
2525
dnf install -y which curl git gnupg2 tar net-tools procps-ng python39 python39-devel python39-pip zip unzip jq
2626

27-
# Tools setup
28-
COPY --chown=0:0 config/yq-setup.sh config/gh-setup.sh /tmp/
29-
RUN dnf install -y go && /tmp/yq-setup.sh && /tmp/gh-setup.sh
30-
3127
# Create user group
3228
RUN groupadd -g 1000 $CONTAINER_USER && \
3329
useradd -u 1000 -g 1000 -d $CONTAINER_USER_HOME $CONTAINER_USER && \
@@ -41,11 +37,15 @@ RUN dnf install -y @development zlib-devel bzip2 bzip2-devel readline-devel sqli
4137
RUN dnf install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2 nss libXScrnSaver alsa-lib
4238

4339
# Add Notebook dependencies
44-
RUN dnf install -y nss xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype && yum clean all
40+
RUN dnf install -y nss xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype && dnf clean all
4541

4642
# Add Yarn dependencies
4743
RUN dnf groupinstall -y "Development Tools" && dnf clean all && rm -rf /var/cache/dnf/*
4844

45+
# Tools setup
46+
COPY --chown=0:0 config/yq-setup.sh config/gh-setup.sh /tmp/
47+
RUN dnf install -y go && /tmp/yq-setup.sh && /tmp/gh-setup.sh
48+
4949
# Setup Shared Memory
5050
RUN chmod -R 777 /dev/shm
5151

docker/ci/dockerfiles/current/build.ubuntu2004.opensearch.x64.arm64.dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ RUN apt-get update -y && apt-get upgrade -y && apt-get install -y docker.io curl
2929
apt-get install -y debmake debhelper-compat && \
3030
apt-get install -y libxrender1 libxtst6 libasound2 libxi6 libgconf-2-4 && \
3131
apt-get install -y libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libatspi2.0-dev libxcomposite-dev libxdamage1 libxfixes3 libxfixes-dev libxrandr2 libgbm-dev libxkbcommon-x11-0 libpangocairo-1.0-0 libcairo2 libcairo2-dev libnss3 libnspr4 libnspr4-dev freeglut3 && \
32+
apt-get install -y docker-compose && \
3233
apt-get clean -y
3334

3435
# Install pip packages
3536
RUN curl -SL https://bootstrap.pypa.io/get-pip.py | python && \
36-
pip3 install pip==23.1.2 && pip3 install pipenv==2023.6.12 awscli==1.32.17 docker-compose==1.29.2
37+
pip3 install pip==23.1.2 && pip3 install pipenv==2023.6.12 awscli==1.32.17
3738

3839
# Install aptly and required changes to debmake
3940
# Remove lintian for now due to it takes nearly 20 minutes for OpenSearch as well as nearly an hour for OpenSearch-Dashboards during debmake
@@ -44,7 +45,7 @@ RUN curl -o- https://www.aptly.info/pubkey.txt | apt-key add - && \
4445

4546
# Tools setup
4647
COPY --chown=0:0 config/jdk-setup.sh config/yq-setup.sh config/gh-setup.sh /tmp/
47-
RUN apt-get install -y golang-go && /tmp/jdk-setup.sh && /tmp/yq-setup.sh && /tmp/gh-setup.sh # Ubuntu has a bug where entrypoint=bash does not actually run .bashrc correctly
48+
RUN apt-get install -y golang-go golang-1.21-go && update-alternatives --install /usr/bin/go go /usr/lib/go-1.21/bin/go 1 && /tmp/jdk-setup.sh && /tmp/yq-setup.sh && /tmp/gh-setup.sh # Ubuntu has a bug where entrypoint=bash does not actually run .bashrc correctly
4849

4950
# Create user group
5051
RUN groupadd -g 1000 $CONTAINER_USER && \

0 commit comments

Comments
 (0)