Files
agnos-builder/Dockerfile.builder
Andrei Radulescu e5fae93540 Build kernel in docker (#247)
* build kernel in container

* remove ci deps

* cleaning

* more cleaning

* even more cleaning

* README.md update for masOS Case-sensitive required volume

* README.md more info about macOS

* README.md more info about macOS

* README.md more info about macOS - M-series vs Intel

* README.md more info about macOS - M-series vs Intel

* extract_tools should install and pull lfs no matter the ARCH

* raise attention on macOS Case-sensitive volume

* --privileged not needed in build_kernel.sh

* remove docker and git checks

* set -e

* always build image

* updated host user in container

* also works with sudo/root

* removed deps in ci since they are not needed anymore

* agnos-meta-builder

* show macOS support only if current path is not on a Case-sensitive APFS volume

* more succint

* just exit

* fixing caching issues

* cache kernel out

* cleaning

* debug out

* ccache-action no needed anymore

* debug

* rebuild

* remove out cache

* revert ccache action

* create-symlink not needed since it's building in the container

* simpler ccache key name

* cleaning

* rebuild

* git ignore .ccache

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-07-25 10:47:56 -07:00

36 lines
936 B
Ruby

FROM ubuntu:20.04
ARG UNAME
ARG UID
ARG GID
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python2 \
build-essential \
libssl-dev \
bc \
python-is-python2 \
openssl \
ccache \
android-sdk-libsparse-utils \
&& rm -rf /var/lib/apt/lists/*
RUN if [ ${UID:-0} -ne 0 ] && [ ${GID:-0} -ne 0 ]; then \
userdel -r `getent passwd ${UID} | cut -d : -f 1` > /dev/null 2>&1; \
groupdel -f `getent group ${GID} | cut -d : -f 1` > /dev/null 2>&1; \
groupadd -g ${GID} -o ${UNAME} && \
useradd -u $UID -g $GID ${UNAME} \
;fi
RUN CCACHE_PATH=$(which ccache) && \
ln -s $CCACHE_PATH /usr/local/bin/gcc && \
ln -s $CCACHE_PATH /usr/local/bin/g++ && \
ln -s $CCACHE_PATH /usr/local/bin/cc && \
ln -s $CCACHE_PATH /usr/local/bin/c++ && \
ln -s $CCACHE_PATH /usr/local/bin/clang
ENTRYPOINT ["tail", "-f", "/dev/null"]