Dockerfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. # The cpu architecture to base the docker base script from
  8. ARG INPUT_ARCHITECTURE=amd64
  9. # The root to base the docker script base from
  10. ARG INPUT_IMAGE=ubuntu:20.04
  11. # The build subfolder where the final artifacts are built in this container which will be used to copy the results out of
  12. ARG INPUT_BUILD_FOLDER=build
  13. # The name of the build script to copy to the docker image to execute
  14. ARG INPUT_DOCKER_BUILD_SCRIPT=build.sh
  15. FROM ${INPUT_ARCHITECTURE}/${INPUT_IMAGE}
  16. ARG INPUT_ARCHITECTURE
  17. ARG INPUT_DOCKER_BUILD_SCRIPT
  18. ARG INPUT_BUILD_FOLDER
  19. ENV WORKSPACE=/data/workspace
  20. ENV DOCKER_BUILD_PATH=$WORKSPACE/$INPUT_BUILD_FOLDER
  21. ENV BUILD_ARCHITECTURE=$INPUT_ARCHITECTURE
  22. WORKDIR $WORKSPACE
  23. # Initilize apt cache
  24. RUN apt-get clean && apt-get update
  25. # Setup time zone and locale data (necessary for SSL and HTTPS packages)
  26. RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata locales keyboard-configuration
  27. RUN apt-get install -y curl zip unzip tar g++ git wget build-essential libssl-dev checkinstall clang tclsh
  28. # Build cmake 3.20 from source
  29. RUN cd /data/workspace && \
  30. mkdir -p cmake_src && \
  31. cd cmake_src && \
  32. wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz && \
  33. tar -zvxf cmake-3.20.0.tar.gz && \
  34. cd cmake-3.20.0 && \
  35. ./bootstrap && \
  36. make -j8 && \
  37. checkinstall --pkgname=cmake --pkgversion="3.20-custom" --default && \
  38. hash -r
  39. ARG CACHEBUST=1
  40. COPY src /data/workspace/src
  41. COPY ${INPUT_DOCKER_BUILD_SCRIPT} /data/workspace/