FROM crosvm-base COPY . /platform/crosvm RUN cargo install --features 'default-no-sandbox wl-dmabuf gpu x' --path . --root /usr ARG UID=1000 ARG GID=1000 RUN export uid=$UID gid=$GID && \ mkdir -p /home/chronos && \ echo "chronos:x:${uid}:${gid}:Developer,,,:/home/chronos:/bin/bash" >> /etc/passwd && \ echo "chronos:x:${uid}:" >> /etc/group && \ chown ${uid}:${gid} -R /home/chronos # Install nvidia proprietary drivers if requested. ARG NVIDIA_VERSION= RUN if [ -n "${NVIDIA_VERSION}" ]; then \ nvidia_url=http://us.download.nvidia.com/XFree86/Linux-x86_64 && \ nvidia_binary=NVIDIA-Linux-x86_64-"${NVIDIA_VERSION}".run && \ curl -LO "${nvidia_url}"/"${NVIDIA_VERSION}"/"${nvidia_binary}" && \ chmod +x ./"${nvidia_binary}" && \ ./"${nvidia_binary}" --accept-license --silent --no-kernel-module; \ fi ENTRYPOINT ["crosvm"]