| FROM gcr.io/google.com/cloudsdktool/cloud-sdk |
| |
| RUN apt-get update && DEBIAN_FRONTEND=noninteractive \ |
| apt-get -y install gawk wget git-core \ |
| diffstat unzip texinfo gcc-multilib build-essential \ |
| file chrpath socat cpio python3 python3-dev python3-pip python3-setuptools \ |
| python3-pexpect python3-sh xz-utils debianutils iputils-ping curl \ |
| libsdl1.2-dev xterm tar sudo locales liblz4-tool zstd \ |
| --no-install-recommends && rm -rf /var/lib/apt/lists/* |
| |
| # Fix error "Please use a locale setting which supports utf-8." |
| # See https://wiki.yoctoproject.org/wiki/TipsAndTricks/ResolvingLocaleIssues |
| RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ |
| echo 'LANG="en_US.UTF-8"'>/etc/default/locale && \ |
| dpkg-reconfigure --frontend=noninteractive locales && \ |
| update-locale LANG=en_US.UTF-8 |
| ENV LC_ALL en_US.UTF-8 |
| ENV LANG en_US.UTF-8 |
| ENV LANGUAGE en_US.UTF-8 |
| |
| # Fast gsutil rsync |
| RUN pip3 install --no-cache-dir -U crcmod --quiet |
| |
| # Create a non-root user that will perform the actual build |
| RUN id build 2>/dev/null || useradd --uid 30000 --create-home build |
| RUN echo "build ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers |
| |
| # enum module for python |
| RUN pip3 install enum34 --user |
| |
| # Google Cloudbuild volume setup |
| RUN mkdir -p /workspace/gcb/bmc |
| RUN chmod -R 777 /workspace/gcb/bmc |
| RUN chown build:build -R /workspace/gcb/bmc |
| |
| USER root |