Dockerfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. # The optional environment variable for list of folders in the mapped temp folders that represent additional 3P dependent packages
  16. ARG INPUT_DEPENDENT_PACKAGE_FOLDERS
  17. FROM ${INPUT_ARCHITECTURE}/${INPUT_IMAGE}
  18. ARG INPUT_DOCKER_BUILD_SCRIPT
  19. ARG INPUT_BUILD_FOLDER
  20. ARG INPUT_DEPENDENT_PACKAGE_FOLDERS
  21. ENV WORKSPACE=/data/workspace
  22. ENV DOCKER_BUILD_PATH=$WORKSPACE/$INPUT_BUILD_FOLDER
  23. ENV DOWNLOADED_PACKAGE_FOLDERS=$INPUT_DEPENDENT_PACKAGE_FOLDERS
  24. WORKDIR $WORKSPACE
  25. # Initilize apt cache
  26. RUN apt-get clean && apt-get update
  27. # Setup time zone and locale data (necessary for SSL and HTTPS packages)
  28. RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata locales keyboard-configuration
  29. # Install the development packages needed to build AWS Gamelift
  30. RUN apt-get install -y build-essential \
  31. git \
  32. cmake \
  33. python3
  34. # Prevent the copying of the src folder from being cached
  35. ARG CACHEBUST=1
  36. # Copy the build script specific to this Docker script in order to execute the build
  37. COPY ${INPUT_DOCKER_BUILD_SCRIPT} /data/workspace/