# Use debian buster as it should be supported by Yocto # FROM debian:buster-20210208-slim #FROM ubuntu:focal-20210119 FROM ubuntu:xenial # Set timezone, needed for Ubuntu ENV TZ=Europe/Amsterdam RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Expected volumes: # /balena-raspberrypi: the Yocto repo for building the image # /var/run/docker.sock: the Docker socket to use for building the image # # These volumes are expected to be owned by the hosts docker group # Create custom user with GID synced to that of the host docker group ARG DOCKER_GID RUN groupadd -g ${DOCKER_GID} docker RUN useradd -ms /bin/bash -G docker,root user # Add dependencies for Yocto and barys RUN apt-get update RUN apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev RUN apt-get install -y docker.io vim jq locales RUN apt-get install -y curl software-properties-common RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get update && apt-get install -y nodejs RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - # Add to repo list, needed for xenial RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list RUN apt-get update && apt-get install -y yarn # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 # Run as our docker user to prevent triggering sanity checks USER user CMD ["/bin/bash"]