Skip to content

Commit

Permalink
tools/docker: update almalinux and rockylinux
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 6, 2024
1 parent a0f0920 commit a8813f1
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 49 deletions.
5 changes: 2 additions & 3 deletions tools/docker/images/almalinux-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
# Trigger first run experience by running arbitrary cmd
RUN dotnet --info

# Java Install
# Install Java 8 SDK
RUN dnf -y update \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf clean all \
&& rm -rf /var/cache/dnf

Expand Down Expand Up @@ -74,7 +74,6 @@ ENV OR_TOOLS_PATCH ${OR_TOOLS_PATCH:-9999}
# Download sources
# use SRC_GIT_SHA1 to modify the command
# i.e. avoid docker reusing the cache when new commit is pushed
SHELL ["/bin/bash", "-c"]
RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch --depth=1 https://github.com/google/or-tools \
&& [[ $(cd or-tools && git rev-parse --verify HEAD) == ${SRC_GIT_SHA1} ]]
WORKDIR /root/or-tools
Expand Down
6 changes: 2 additions & 4 deletions tools/docker/images/rockylinux-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ENTRYPOINT ["/usr/bin/bash", "-c"]
CMD [ "/usr/bin/bash" ]

# Install SWIG 4.2.1
FROM base AS swig
RUN dnf -y update \
&& dnf -y install pcre2-devel \
&& dnf clean all \
Expand All @@ -38,9 +37,9 @@ RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
# Trigger first run experience by running arbitrary cmd
RUN dotnet --info

# Java Install
# Install Java 8 SDK
RUN dnf -y update \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf clean all \
&& rm -rf /var/cache/dnf

Expand Down Expand Up @@ -74,7 +73,6 @@ ENV OR_TOOLS_PATCH ${OR_TOOLS_PATCH:-9999}
# Download sources
# use SRC_GIT_SHA1 to modify the command
# i.e. avoid docker reusing the cache when new commit is pushed
SHELL ["/bin/bash", "-c"]
RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch --depth=1 https://github.com/google/or-tools \
&& [[ $(cd or-tools && git rev-parse --verify HEAD) == ${SRC_GIT_SHA1} ]]
WORKDIR /root/or-tools
Expand Down
8 changes: 4 additions & 4 deletions tools/docker/test/almalinux-9/cpp.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ FROM almalinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
#ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y groupinstall 'Development Tools' \
&& dnf -y install zlib-devel cmake \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

WORKDIR /root
ADD or-tools_amd64_almalinux-9_cpp_v*.tar.gz .
Expand Down
16 changes: 7 additions & 9 deletions tools/docker/test/almalinux-9/dotnet.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ FROM almalinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y groupinstall 'Development Tools' \
&& dnf -y install zlib-devel \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

# Install .Net
# see: https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
&& chmod a+x dotnet-install.sh \
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
RUN dnf -y update \
&& dnf -y install dotnet-sdk-6.0 \
&& dnf clean all \
&& rm -rf /var/cache/dnf
# Trigger first run experience by running arbitrary cmd
RUN dotnet --info

Expand Down
9 changes: 4 additions & 5 deletions tools/docker/test/almalinux-9/java.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ FROM almalinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y groupinstall 'Development Tools' \
&& dnf -y install zlib-devel \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

# Install Java 8 SDK
RUN dnf -y update \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf clean all \
&& rm -rf /var/cache/dnf

Expand Down
6 changes: 3 additions & 3 deletions tools/docker/test/almalinux-9/python.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ FROM almalinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
#ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

# Install Python
RUN dnf -y update \
&& dnf -y install python3-devel python3-pip python3-numpy \
&& dnf -y install python3 python3-devel python3-pip python3-numpy \
&& dnf clean all \
&& rm -rf /var/cache/dnf
RUN python3 -m pip install \
Expand Down
8 changes: 4 additions & 4 deletions tools/docker/test/rockylinux-9/cpp.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ FROM rockylinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
#ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y groupinstall 'Development Tools' \
&& dnf -y install zlib-devel cmake \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

WORKDIR /root
ADD or-tools_amd64_rockylinux-9_cpp_v*.tar.gz .
Expand Down
16 changes: 7 additions & 9 deletions tools/docker/test/rockylinux-9/dotnet.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ FROM rockylinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y groupinstall 'Development Tools' \
&& dnf -y install zlib-devel \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

# Install .Net
# see: https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
&& chmod a+x dotnet-install.sh \
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
RUN dnf -y update \
&& dnf -y install dotnet-sdk-6.0 \
&& dnf clean all \
&& rm -rf /var/cache/dnf
# Trigger first run experience by running arbitrary cmd
RUN dotnet --info

Expand Down
9 changes: 4 additions & 5 deletions tools/docker/test/rockylinux-9/java.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ FROM rockylinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y groupinstall 'Development Tools' \
&& dnf -y install zlib-devel \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

# Install Java 8 SDK
RUN dnf -y update \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \
&& dnf clean all \
&& rm -rf /var/cache/dnf

Expand Down
6 changes: 3 additions & 3 deletions tools/docker/test/rockylinux-9/python.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ FROM rockylinux:9
#############
## SETUP ##
#############
ENV PATH=/usr/local/bin:$PATH
#ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]
#CMD ["/usr/bin/bash"]

# Install Python
RUN dnf -y update \
&& dnf -y install python3-devel python3-pip python3-numpy \
&& dnf -y install python3 python3-devel python3-pip python3-numpy \
&& dnf clean all \
&& rm -rf /var/cache/dnf
RUN python3 -m pip install \
Expand Down

0 comments on commit a8813f1

Please sign in to comment.