Skip to content

Instantly share code, notes, and snippets.

@haampie
Created Jan 24, 2020
Embed
What would you like to do?
Build some Qt modules with AddressSanitizer
FROM ubuntu:18.04 AS builder
SHELL ["/bin/bash", "-c"]
WORKDIR /development
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
curl \
file \
git \
libegl1-mesa \
libfontconfig1-dev \
libfreetype6-dev \
libfuse2 \
libgl1-mesa-dev \
libglu1-mesa-dev \
libhdf5-dev \
libx11-dev \
libx11-xcb-dev \
libxcb-glx0-dev \
libxcb1-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxkbcommon-x11-dev \
libxrender-dev \
libxt-dev \
p7zip-full \
python \
software-properties-common \
wget \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN git clone git://code.qt.io/qt/qt5.git && cd qt5 && git checkout 5.12.6
RUN cd qt5 && perl init-repository --module-subset=default,-qt3d,-qtactiveqt,-qtandroidextras,-qtcanvas3d,-qtcharts,-qtconnectivity,-qtdatavis3d,-qtdoc,-qtdocgallery,-qtfeedback,-qtgamepad,-qtimageformats,-qtlocation,-qtmacextras,-qtmultimedia,-qtnetworkauth,-qtpim,-qtpurchasing,-qtqa,-qtremoteobjects,-qtrepotools,-qtscript,-qtscxml,-qtsensors,-qtserialbus,-qtserialport,-qtspeech,-qtsvg,-qtsystems,-qtvirtualkeyboard,-qtwayland,-qtwebchannel,-qtwebengine,-qtwebglplugin,-qtwebsockets,-qtwebview,-qtwinextras,-qtx11extras,-qtxmlpatterns
RUN mkdir qt5_build && cd qt5_build && ../qt5/configure \
-qt-xcb \
-sanitize address \
-opensource \
-confirm-license \
-no-widgets \
-nomake examples \
-nomake tests \
-debug \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtcharts \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdoc \
-skip qtdocgallery \
-skip qtfeedback \
-skip qtgamepad \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtmultimedia \
-skip qtnetworkauth \
-skip qtpim \
-skip qtpurchasing \
-skip qtqa \
-skip qtremoteobjects \
-skip qtrepotools \
-skip qtscript \
-skip qtscxml \
-skip qtsensors \
-skip qtserialbus \
-skip qtserialport \
-skip qtspeech \
-skip qtsvg \
-skip qtsystems \
-skip qtvirtualkeyboard \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebglplugin \
-skip qtwebsockets \
-skip qtwebview \
-skip qtwinextras \
-skip qtx11extras \
-skip qtxmlpatterns && make -j$(nproc) && make install
FROM ubuntu:18.04
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
curl \
file \
git \
libegl1-mesa \
libfontconfig1-dev \
libfreetype6-dev \
libfuse2 \
libgl1-mesa-dev \
libglu1-mesa-dev \
libhdf5-dev \
libx11-dev \
libx11-xcb-dev \
libxcb-glx0-dev \
libxcb1-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxkbcommon-x11-0 \
libxrender-dev \
libxt-dev \
p7zip-full \
software-properties-common \
wget \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /development
RUN wget -q https://github.com/Kitware/CMake/releases/download/v3.16.3/cmake-3.16.3-Linux-x86_64.sh && chmod +x cmake-3.16.3-Linux-x86_64.sh && ./cmake-3.16.3-Linux-x86_64.sh --skip-license --prefix=/usr/local/ && rm cmake-3.16.3-Linux-x86_64.sh
COPY --from=builder /usr/local/Qt-5.12.6 /usr/local/Qt-5.12.6
ENV PATH="/usr/local/Qt-5.12.6/bin:$PATH"
RUN wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -P /usr/local/bin && chmod +x /usr/local/bin/linuxdeploy-x86_64.AppImage
RUN wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -P /usr/local/bin && chmod +x /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment