github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/.circleci/images/test-image-tamago/Dockerfile (about)

     1  FROM ubuntu:22.04
     2  
     3  RUN apt-get update -y
     4  RUN apt-get dist-upgrade -y
     5  
     6  # create user "builder" with sudo privileges
     7  ARG GID
     8  ARG UID
     9  ARG USER=builder
    10  RUN groupadd --gid ${GID} $USER
    11  RUN useradd --uid ${UID} --gid $USER --shell /bin/bash --home-dir /home/$USER --create-home $USER
    12  RUN apt-get install -y sudo
    13  RUN echo "$USER ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers
    14  
    15  ENV TZ=Europe/Rome
    16  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
    17  
    18  RUN apt-get install -y cmake gcc gcc-arm-none-eabi gcc-mingw-w64 git gzip \
    19                         libsodium-dev libusb-1.0-0 make pkg-config protobuf-compiler \
    20                         u-boot-tools vim wget
    21  
    22  # install tamago-go
    23  ENV TAMAGO_VERSION="1.19.3"
    24  ENV TAMAGO_CHECKSUM="b614e5266e0933c67f00d77987d49e7fd290704c86482f97c8bb2c2e26e46e9f"
    25  RUN wget -O tamago-go.tgz https://github.com/usbarmory/tamago-go/releases/download/tamago-go${TAMAGO_VERSION}/tamago-go${TAMAGO_VERSION}.linux-amd64.tar.gz
    26  RUN echo "${TAMAGO_CHECKSUM} tamago-go.tgz" | sha256sum --strict --check -
    27  RUN tar -C / -xzf tamago-go.tgz && rm tamago-go.tgz
    28  
    29  ENV GOPATH "/home/${USER}/go"
    30  ENV USBARMORY_GIT "/home/${USER}/usbarmory"
    31  ENV TAMAGO "/usr/local/tamago-go/bin/go"
    32  ENV PATH "${PATH}:${GOPATH}/bin:/usr/local/tamago-go/bin"
    33  
    34  USER $USER
    35  WORKDIR /build
    36  
    37  # for u-root circleci
    38  RUN sudo mkdir -p /home/circleci
    39  # IDs are still in flux.
    40  RUN sudo chown $USER:$USER /home/circleci