aboutsummaryrefslogtreecommitdiffstats
path: root/docker/focal/test-qt4.Dockerfile
diff options
context:
space:
mode:
authorRaphaël Cotty <raphael.cotty@gmail.com>2020-12-16 15:18:07 +0100
committerRaphaël Cotty <raphael.cotty@gmail.com>2020-12-18 12:38:01 +0000
commit1bb4c3c95e548bd57f733f2936e370cd40e81765 (patch)
treead880c5ad14349956e3d1885c4e8fb0b8246cc23 /docker/focal/test-qt4.Dockerfile
parent9e9caf2268fd75f4bddd74084afcc7ba27fe5d2e (diff)
Add qt4 docker image for basic testing
Change-Id: Ied6d9eac49fcb20de72499ab7c39e83a90a98b75 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'docker/focal/test-qt4.Dockerfile')
-rw-r--r--docker/focal/test-qt4.Dockerfile40
1 files changed, 40 insertions, 0 deletions
diff --git a/docker/focal/test-qt4.Dockerfile b/docker/focal/test-qt4.Dockerfile
new file mode 100644
index 000000000..c23a664d2
--- /dev/null
+++ b/docker/focal/test-qt4.Dockerfile
@@ -0,0 +1,40 @@
+#
+# Testing Qbs with qt4
+#
+FROM ubuntu:focal
+LABEL Description="Ubuntu qt4 test environment for Qbs"
+
+# Allow colored output on command line.
+ENV TERM=xterm-color
+
+#
+# Make it possible to change UID/GID in the entrypoint script. The docker
+# container usually runs as root user on Linux hosts. When the Docker container
+# mounts a folder on the host and creates files there, those files would be
+# owned by root instead of the current user. Thus we create a user here who's
+# UID will be changed in the entrypoint script to match the UID of the current
+# host user.
+#
+ARG USER_UID=1000
+ARG USER_NAME=devel
+RUN apt-get update -qq && \
+ apt-get install -qq -y \
+ ca-certificates \
+ gosu \
+ software-properties-common \
+ sudo && \
+ groupadd -g ${USER_UID} ${USER_NAME} && \
+ useradd -s /bin/bash -u ${USER_UID} -g ${USER_NAME} -o -c "" -m ${USER_NAME} && \
+ usermod -a -G sudo ${USER_NAME} && \
+ echo "%devel ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
+
+COPY docker/focal/entrypoint.sh /sbin/entrypoint.sh
+ENTRYPOINT ["/sbin/entrypoint.sh"]
+
+# Install baremetal toolchains and Qbs runtime dependencies.
+RUN sudo add-apt-repository ppa:gezakovacs/ppa -y && \
+ apt-get update -qq && \
+ apt-get install -qq -y \
+ build-essential \
+ libqt4-dev
+