Last active
August 21, 2017 04:31
-
-
Save facontidavide/eaf3bdef69e19fad567164bbbd7fea6e to your computer and use it in GitHub Desktop.
Xenial. Dockerfile for KF5 development + heaptrack + hotspot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update | |
RUN apt-get install -y --no-install-recommends software-properties-common locate | |
RUN add-apt-repository ppa:beineri/opt-qt58-xenial -y | |
RUN apt-get update | |
RUN apt-get dist-upgrade -y | |
RUN apt-get install -y --no-install-recommends build-essential git cmake gettext snapcraft wget apt-utils | |
RUN apt-get install -y --no-install-recommends kio-dev libkf5itemmodels-dev libkf5itemviews-dev libkf5coreaddons-dev \ | |
libkf5configwidgets-dev libkf5i18n-dev libkf5threadweaver-dev | |
RUN apt-get install -y libdw-dev libkf5kiocore5 libkf5kiowidgets5 libsparsehash-dev \ | |
elfutils libelf-dev | |
RUN apt-get install -y qt58base qt58tools qt58svg libunwind-dev | |
RUN cd /home && git clone git://anongit.kde.org/extra-cmake-modules && \ | |
cd extra-cmake-modules && mkdir build && cd build && cmake .. && \ | |
make && make install | |
#https://userbase.kde.org/Heaptrack/Build/Ubuntu_16.04 | |
RUN cd /home && git clone git://anongit.kde.org/kdiagram && mkdir kdiagram/build && \ | |
cd kdiagram/build && cmake -DCMAKE_PREFIX_PATH=/opt/qt58/lib/cmake .. && \ | |
make -j4 && make install | |
RUN apt-get install -y libboost-dev | |
RUN apt-get install -y libboost-iostreams-dev libboost-program-options-dev | |
RUN cd /home && git clone git://anongit.kde.org/heaptrack && mkdir heaptrack/build && \ | |
cd heaptrack/build && cmake -DCMAKE_PREFIX_PATH=/opt/qt58/lib/cmake .. && \ | |
make -j4 && make install | |
RUN cd /home && git clone https://github.com/KDAB/hotspot.git && cd hotspot && git submodule update --init --recursive &&\ | |
mkdir build | |
RUN cd /home/hotspot/build && cmake -DCMAKE_PREFIX_PATH=/opt/qt58/lib/cmake .. && \ | |
make -j4 && make install | |
RUN apt-get clean autoclean && apt-get autoremove -y && \ | |
rm -rf /var/lib/apt /var/lib/dpkg /var/lib/cache /var/lib/log | |
ENV USERNAME developer | |
RUN useradd -m $USERNAME && \ | |
echo "$USERNAME:$USERNAME" | chpasswd && \ | |
usermod --shell /bin/bash $USERNAME && \ | |
usermod -aG sudo $USERNAME && \ | |
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \ | |
chmod 0440 /etc/sudoers.d/$USERNAME && \ | |
# Replace 1000 with your user/group id | |
usermod --uid 1000 $USERNAME && \ | |
groupmod --gid 1000 $USERNAME | |
RUN echo '. /opt/qt58/bin/qt58-env.sh' >> /root/.bashrc | |
RUN echo '. /opt/qt58/bin/qt58-env.sh' >> /home/developer/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment