Dockerfile 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright (c) Contributors to the Open 3D Engine Project.
  2. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 OR MIT
  5. #
  6. # This docker file uses ubuntu 20.04 as the base image to install the dependencies to build Qt from source
  7. #
  8. # The cpu architecture to base the docker base script from
  9. ARG INPUT_ARCHITECTURE=amd64
  10. # The root to base the docker script base from
  11. ARG INPUT_IMAGE=ubuntu:20.04
  12. # The build subfolder where the final artifacts are built in this container which will be used to copy the results out of
  13. ARG INPUT_BUILD_FOLDER=build
  14. # The name of the build script to copy to the docker image to execute
  15. ARG INPUT_DOCKER_BUILD_SCRIPT=build.sh
  16. # The optional environment variable for list of folders in the mapped temp folders that represent additional 3P dependent packages
  17. ARG INPUT_DEPENDENT_PACKAGE_FOLDERS
  18. FROM ${INPUT_ARCHITECTURE}/${INPUT_IMAGE}
  19. ARG INPUT_DOCKER_BUILD_SCRIPT
  20. ARG INPUT_BUILD_FOLDER
  21. ARG INPUT_DEPENDENT_PACKAGE_FOLDERS
  22. ENV WORKSPACE=/data/workspace
  23. ENV DOCKER_BUILD_PATH=$WORKSPACE/$INPUT_BUILD_FOLDER
  24. ENV DOWNLOADED_PACKAGE_FOLDERS=$INPUT_DEPENDENT_PACKAGE_FOLDERS
  25. WORKDIR $WORKSPACE
  26. # Initilize apt cache
  27. RUN DEBIAN_FRONTEND="noninteractive" apt-get update
  28. # Setup time zone and locale data (necessary for SSL and HTTPS packages)
  29. RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata locales keyboard-configuration
  30. RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
  31. dpkg-reconfigure --frontend=noninteractive locales && \
  32. update-locale LANG=en_US.UTF-8
  33. ENV LANG=en_US.UTF-8
  34. ENV ENABLE_QT_WAYLAND=0
  35. # Install the development packages needed to build Qt from source
  36. RUN apt-get install -y qtbase5-dev \
  37. build-essential \
  38. perl \
  39. python3 \
  40. git \
  41. '^libxcb.*-dev' \
  42. libx11-xcb-dev \
  43. libglu1-mesa-dev \
  44. libxrender-dev \
  45. libxi-dev \
  46. libxkbcommon-dev \
  47. libxkbcommon-x11-dev \
  48. libgbm-dev \
  49. libxext-dev \
  50. libfontconfig1-dev \
  51. libtiff-dev \
  52. libwayland-dev \
  53. libwayland-egl1-mesa \
  54. libwayland-server0 \
  55. libgles2-mesa-dev \
  56. libdrm-dev
  57. # Prepare a target folder within the container to install the build artifacts tp
  58. RUN mkdir -p /data/workspace/qt
  59. RUN git clone --single-branch --recursive --branch v5.15.1 git://code.qt.io/qt/qtwayland.git && \
  60. ln -s /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/qwayland-server-qt-texture-sharing-unstable-v1.h /data/workspace/qtwayland/src/compositor/qwayland-server-qt-texture-sharing-unstable-v1.h && \
  61. ln -s /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/wayland-qt-texture-sharing-unstable-v1-server-protocol.h /data/workspace/qtwayland/src/compositor/wayland-qt-texture-sharing-unstable-v1-server-protocol.h
  62. # Copy the build script specific to this Docker script in order to execute the build
  63. COPY docker_build_qt_linux.sh /data/workspace/