1# 2# Testing Qbs with qt4 3# 4FROM ubuntu:focal 5LABEL Description="Ubuntu qt4 test environment for Qbs" 6 7# Allow colored output on command line. 8ENV TERM=xterm-color 9 10# 11# Make it possible to change UID/GID in the entrypoint script. The docker 12# container usually runs as root user on Linux hosts. When the Docker container 13# mounts a folder on the host and creates files there, those files would be 14# owned by root instead of the current user. Thus we create a user here who's 15# UID will be changed in the entrypoint script to match the UID of the current 16# host user. 17# 18ARG USER_UID=1000 19ARG USER_NAME=devel 20RUN apt-get update -qq && \ 21 apt-get install -qq -y \ 22 ca-certificates \ 23 gosu \ 24 software-properties-common \ 25 sudo && \ 26 groupadd -g ${USER_UID} ${USER_NAME} && \ 27 useradd -s /bin/bash -u ${USER_UID} -g ${USER_NAME} -o -c "" -m ${USER_NAME} && \ 28 usermod -a -G sudo ${USER_NAME} && \ 29 echo "%devel ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers 30 31COPY docker/focal/entrypoint.sh /sbin/entrypoint.sh 32ENTRYPOINT ["/sbin/entrypoint.sh"] 33 34# Install baremetal toolchains and Qbs runtime dependencies. 35RUN sudo add-apt-repository ppa:gezakovacs/ppa -y && \ 36 apt-get update -qq && \ 37 apt-get install -qq -y \ 38 build-essential \ 39 libqt4-dev 40 41