1515# specific language governing permissions and limitations
1616# under the License.
1717
18- ARG base=amd64/ubuntu:21 .04
18+ ARG base=amd64/ubuntu:22 .04
1919FROM ${base}
2020
2121SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
@@ -29,7 +29,7 @@ RUN echo "debconf debconf/frontend select Noninteractive" | \
2929# while debugging package list with docker build.
3030ARG clang_tools
3131ARG llvm
32- RUN latest_system_llvm=12 && \
32+ RUN latest_system_llvm=14 && \
3333 if [ ${llvm} -gt ${latest_system_llvm} -o \
3434 ${clang_tools} -gt ${latest_system_llvm} ]; then \
3535 apt-get update -y -q && \
@@ -96,6 +96,7 @@ RUN apt-get update -y -q && \
9696 pkg-config \
9797 protobuf-compiler \
9898 protobuf-compiler-grpc \
99+ python3-dev \
99100 python3-pip \
100101 rapidjson-dev \
101102 rsync \
@@ -104,6 +105,38 @@ RUN apt-get update -y -q && \
104105 apt-get clean && \
105106 rm -rf /var/lib/apt/lists*
106107
108+ ARG gcc_version=""
109+ RUN if [ "${gcc_version}" = "" ]; then \
110+ apt-get update -y -q && \
111+ apt-get install -y -q --no-install-recommends \
112+ g++ \
113+ gcc; \
114+ else \
115+ if [ "${gcc_version}" -gt "11" ]; then \
116+ apt-get update -y -q && \
117+ apt-get install -y -q --no-install-recommends software-properties-common && \
118+ add-apt-repository ppa:ubuntu-toolchain-r/volatile; \
119+ fi; \
120+ apt-get update -y -q && \
121+ apt-get install -y -q --no-install-recommends \
122+ g++-${gcc_version} \
123+ gcc-${gcc_version} && \
124+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 100 && \
125+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} 100 && \
126+ update-alternatives --install \
127+ /usr/bin/$(uname --machine)-linux-gnu-gcc \
128+ $(uname --machine)-linux-gnu-gcc \
129+ /usr/bin/$(uname --machine)-linux-gnu-gcc-${gcc_version} 100 && \
130+ update-alternatives --install \
131+ /usr/bin/$(uname --machine)-linux-gnu-g++ \
132+ $(uname --machine)-linux-gnu-g++ \
133+ /usr/bin/$(uname --machine)-linux-gnu-g++-${gcc_version} 100 && \
134+ update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100 && \
135+ update-alternatives --set cc /usr/bin/gcc && \
136+ update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 100 && \
137+ update-alternatives --set c++ /usr/bin/g++; \
138+ fi
139+
107140COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
108141RUN /arrow/ci/scripts/install_minio.sh latest /usr/local
109142
@@ -149,27 +182,3 @@ ENV ARROW_BUILD_TESTS=ON \
149182 Protobuf_SOURCE=BUNDLED \
150183 PATH=/usr/lib/ccache/:$PATH \
151184 PYTHON=python3
152-
153- ARG gcc_version=""
154- RUN if [ "${gcc_version}" = "" ]; then \
155- apt-get update -y -q && \
156- apt-get install -y -q --no-install-recommends \
157- g++ \
158- gcc; \
159- else \
160- if [ "${gcc_version}" -gt "10" ]; then \
161- apt-get update -y -q && \
162- apt-get install -y -q --no-install-recommends software-properties-common && \
163- add-apt-repository ppa:ubuntu-toolchain-r/volatile; \
164- fi; \
165- apt-get update -y -q && \
166- apt-get install -y -q --no-install-recommends \
167- g++-${gcc_version} \
168- gcc-${gcc_version} && \
169- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 100 && \
170- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} 100 && \
171- update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100 && \
172- update-alternatives --set cc /usr/bin/gcc && \
173- update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 100 && \
174- update-alternatives --set c++ /usr/bin/g++; \
175- fi
0 commit comments