Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. FROM ubuntu:18.04
  2. RUN groupadd --gid 1000 builduser \
  3. && useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
  4. # Set up TEMP directory
  5. ENV TEMP=/tmp
  6. RUN chmod a+rwx /tmp
  7. # Install Linux packages
  8. ADD build/install-build-deps.sh /setup/install-build-deps.sh
  9. RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
  10. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
  11. curl \
  12. libnotify-bin \
  13. locales \
  14. lsb-release \
  15. nano \
  16. python-dbusmock \
  17. python-pip \
  18. python-setuptools \
  19. sudo \
  20. vim-nox \
  21. wget \
  22. && /setup/install-build-deps.sh --syms --no-prompt --no-chromeos-fonts --lib32 --arm \
  23. && rm -rf /var/lib/apt/lists/*
  24. # Install Node.js
  25. RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
  26. && DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs \
  27. && rm -rf /var/lib/apt/lists/*
  28. # crcmod is required by gsutil, which is used for filling the gclient git cache
  29. RUN pip install -U crcmod
  30. RUN mkdir /tmp/workspace
  31. RUN chown builduser:builduser /tmp/workspace
  32. # Add xvfb init script
  33. ADD tools/xvfb-init.sh /etc/init.d/xvfb
  34. RUN chmod a+x /etc/init.d/xvfb
  35. USER builduser
  36. WORKDIR /home/builduser