-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
90 lines (78 loc) · 2.51 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
FROM ubuntu:18.04
ARG QT_VERSION=5.12.4
ARG QT_DOWNLOAD_BASE_URL=https://download.qt.io
ENV DEBIAN_FRONTEND noninteractive
ENV QT_PATH /opt/Qt
ENV QT_DESKTOP $QT_PATH/${QT_VERSION}/gcc_64
ENV PATH $QT_DESKTOP/bin:$PATH
# Install updates & requirements:
# * git, openssh-client, ca-certificates - clone & build
# * locales, sudo - useful to set utf-8 locale & sudo usage
# * curl - to download Qt bundle
# * build-essential, pkg-config, libgl1-mesa-dev - basic Qt build requirements
RUN apt update && apt full-upgrade -y && apt install -y --no-install-recommends \
git \
openssh-client \
ca-certificates \
locales \
sudo \
curl \
build-essential \
gcc-multilib \
g++-multilib \
pkg-config \
libgl1-mesa-dev \
\
libpoppler-qt5-dev \
libopencv-dev \
libzbar-dev \
libkf5solid-dev \
libkf5archive-dev \
\
bison \
libssl-dev \
libxcursor-dev \
libxcomposite-dev \
libxdamage-dev \
libxrandr-dev \
libfontconfig1-dev \
libxss-dev \
libsrtp0-dev \
libwebp-dev \
libjsoncpp-dev \
libopus-dev \
libminizip-dev \
libavutil-dev \
libavformat-dev \
libavcodec-dev \
libevent-dev \
libasound2-dev \
libbz2-dev \
libcap-dev \
libcups2-dev \
libdrm-dev \
libegl1-mesa-dev \
libgcrypt11-dev \
libnss3-dev \
libpci-dev \
libpulse-dev \
libudev-dev \
libxtst-dev \
\
&& apt-get -qq clean
COPY extract-qt-installer.sh /tmp/qt/
# Download & unpack Qt toolchains
# Clean
RUN curl -Lo /tmp/qt/installer.run "${QT_DOWNLOAD_BASE_URL}/official_releases/qt/$(echo "${QT_VERSION}" | cut -d. -f 1-2)/${QT_VERSION}/qt-opensource-linux-x64-${QT_VERSION}.run" \
&& export QT_VER=$(echo "${QT_VERSION}" | tr -d .) \
&& export QT_CI_PACKAGES=qt.qt5.$QT_VER.gcc_64,qt.qt5.$QT_VER.qtcharts,qt.qt5.$QT_VER.qtdatavis3d,qt.qt5.$QT_VER.qtpurchasing,qt.qt5.$QT_VER.qtvirtualkeyboard,qt.qt5.$QT_VER.qtwebengine,qt.qt5.$QT_VER.qtnetworkauth,qt.qt5.$QT_VER.qtwebglplugin,qt.qt5.$QT_VER.qtscript \
&& /tmp/qt/extract-qt-installer.sh /tmp/qt/installer.run "$QT_PATH" \
&& find "$QT_PATH" -mindepth 1 -maxdepth 1 ! -name "${QT_VERSION}" -exec echo 'Cleaning Qt SDK: {}' \; -exec rm -r '{}' \; \
&& rm -rf /tmp/qt
# Reconfigure locale
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales
# Add group & user + sudo
RUN groupadd -r user && useradd --create-home --gid user user && echo 'user ALL=NOPASSWD: ALL' > /etc/sudoers.d/user
USER user
WORKDIR /home/user
ENV HOME /home/user