1# This Dockerfile generates the docker image that gets used by Gitlab CI
2# To build it (YYYYMMDD.HHMM is the current date and time in UTC):
3#   docker build -t registry.gitlab.com/buildroot.org/buildroot/base:YYYYMMDD.HHMM support/docker
4#   docker push registry.gitlab.com/buildroot.org/buildroot/base:YYYYMMDD.HHMM
5
6# We use a specific tag for the base image *and* the corresponding date
7# for the repository., so do not forget to update the apt-sources.list
8# file that is shipped next to this Dockerfile.
9FROM debian:bullseye-20230202
10
11LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \
12      vendor="Buildroot" \
13description="Container with everything needed to run Buildroot"
14
15# Setup environment
16ENV DEBIAN_FRONTEND noninteractive
17
18# This repository can be a bit slow at times. Don't panic...
19COPY apt-sources.list /etc/apt/sources.list
20
21# The container has no package lists, so need to update first
22RUN dpkg --add-architecture i386 && \
23    apt-get -o APT::Retries=3 update -y
24RUN apt-get -o APT::Retries=3 install -y --no-install-recommends \
25        bc \
26        build-essential \
27        bzr \
28        ca-certificates \
29        cmake \
30        cpio \
31        cvs \
32        file \
33        g++-multilib \
34        git \
35        libc6:i386 \
36        libncurses5-dev \
37        locales \
38        mercurial \
39        openssh-server \
40        python3 \
41        python3-flake8 \
42        python3-magic \
43        python3-nose2 \
44        python3-pexpect \
45        python3-pytest \
46        qemu-system-arm \
47        qemu-system-misc \
48        qemu-system-x86 \
49        rsync \
50        shellcheck \
51        subversion \
52        unzip \
53        wget \
54        && \
55    apt-get -y autoremove && \
56    apt-get -y clean
57
58# To be able to generate a toolchain with locales, enable one UTF-8 locale
59RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
60    /usr/sbin/locale-gen
61
62RUN useradd -ms /bin/bash br-user && \
63    chown -R br-user:br-user /home/br-user
64
65USER br-user
66WORKDIR /home/br-user
67ENV HOME /home/br-user
68ENV LC_ALL en_US.UTF-8
69