Skip to content

Commit 1a4fa77

Browse files
authored
Merge pull request #50 from LibrePCB/update-ubuntu-20.04-qt6.6
Ubuntu 20.04/Qt6: Update CMake & GCC, install Rust toolchain
2 parents 70c565a + 7842785 commit 1a4fa77

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

ubuntu-20.04-qt6.6/Dockerfile

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ ARG DEBIAN_FRONTEND=noninteractive
55
RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
66
bzip2 \
77
ca-certificates \
8+
cargo \
89
clang \
9-
cmake \
1010
curl \
1111
dbus \
1212
doxygen \
1313
file \
14-
g++ \
14+
g++-10 \
1515
git \
1616
graphviz \
1717
libc++-dev \
@@ -24,6 +24,7 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
2424
libglu1-mesa-dev \
2525
libodbc1 \
2626
libpq5 \
27+
libssl-dev \
2728
libxcb-cursor0 \
2829
libxcb-glx0 \
2930
libxcb-icccm4 \
@@ -45,20 +46,49 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
4546
python3-pip \
4647
python3-setuptools \
4748
python3-wheel \
49+
rustc \
4850
software-properties-common \
4951
wget \
5052
xvfb \
5153
zlib1g \
5254
zlib1g-dev \
5355
&& rm -rf /var/lib/apt/lists/*
5456

57+
# Activate g++-10
58+
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
59+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
60+
5561
# Set Python3 as default Python version
5662
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 100
5763
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 100
5864

5965
# Allow installing pip packages system-wide since there's no risk in a container
6066
ENV PIP_BREAK_SYSTEM_PACKAGES=1
6167

68+
# Make .cargo/ writable for everyone to allow running the container as non-root
69+
RUN mkdir /.cargo && chmod 777 /.cargo
70+
71+
# Install CMake
72+
ARG CMAKE_VERSION="3.31.1"
73+
ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION.tar.gz"
74+
RUN wget -c "${CMAKE_URL}" -O /tmp.tar.gz \
75+
&& tar -xzf /tmp.tar.gz -C /opt \
76+
&& rm /tmp.tar.gz \
77+
&& cd "/opt/cmake-$CMAKE_VERSION" \
78+
&& ./bootstrap --parallel=`nproc` \
79+
&& make -j`nproc` \
80+
&& make install \
81+
&& cd / && rm -rf "/opt/cmake-$CMAKE_VERSION"
82+
83+
# Install sccache
84+
ARG SCCACHE_VERSION="0.8.2"
85+
ARG SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v$SCCACHE_VERSION/sccache-v$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz"
86+
RUN wget -c "$SCCACHE_URL" -O /tmp.tar.gz \
87+
&& tar -zxf /tmp.tar.gz \
88+
&& cp "./sccache-v$SCCACHE_VERSION-x86_64-unknown-linux-musl/sccache" /usr/local/bin/ \
89+
&& rm -rf "./sccache-v$SCCACHE_VERSION-x86_64-unknown-linux-musl" \
90+
&& rm /tmp.tar.gz
91+
6292
# Install OpenCascade
6393
ARG OCC_VERSION="7_7_2"
6494
ARG OCC_URL="https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V$OCC_VERSION.tar.gz"
@@ -174,7 +204,7 @@ RUN /appimagetool-x86_64.AppImage --appimage-extract \
174204

175205
# Install latest OpenSSL to avoid possible issues if servers some day stop
176206
# working with an old OpenSSL library (as already happened in the past).
177-
ARG OPENSSL_VERSION="3.2.1"
207+
ARG OPENSSL_VERSION="3.4.0"
178208
RUN wget -c "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -O /tmp.tar.gz \
179209
&& tar -zxf /tmp.tar.gz \
180210
&& cd "./openssl-$OPENSSL_VERSION" \

0 commit comments

Comments
 (0)