github.com/usbarmory/armory-boot@v0.0.0-20240307133412-208c66a380b9/docker/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 "builder 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.20.4" 24 ENV TAMAGO_CHECKSUM="b04288f094a716a9552d265028ca4a3a2c610e78d868b3fc67a7b38ffee2b30b" 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 # install minisign 30 ENV MINISIGN_VERSION="0.10" 31 ENV MINISIGN_CHECKSUM="9fe40c2bd899a91f6b62a6ff3d469ece670f155307df50c2482ddd31337ab6da" 32 RUN wget -O minisign.tgz https://github.com/jedisct1/minisign/archive/refs/tags/${MINISIGN_VERSION}.tar.gz 33 RUN echo "${MINISIGN_CHECKSUM} minisign.tgz" | sha256sum --strict --check - 34 RUN tar -xzf minisign.tgz 35 RUN cd minisign-${MINISIGN_VERSION}; mkdir build; cd build; cmake ..; make; make install 36 RUN rm -r minisign* 37 38 # install habtool 39 ENV HABTOOL_VERSION="v2022.05.25" 40 RUN su - $USER -c "/usr/local/tamago-go/bin/go install github.com/usbarmory/crucible/cmd/habtool@${HABTOOL_VERSION}" 41 42 ENV GOPATH "/home/${USER}/go" 43 ENV USBARMORY_GIT "/home/${USER}/usbarmory" 44 ENV TAMAGO "/usr/local/tamago-go/bin/go" 45 ENV PATH "${PATH}:${GOPATH}/bin:/usr/local/tamago-go/bin" 46 47 USER $USER 48 WORKDIR /build