github.com/transparency-dev/armored-witness-boot@v0.1.0/Dockerfile (about)

     1  FROM golang:1.22-bookworm
     2  
     3  ARG TAMAGO_VERSION
     4  ARG LOG_ORIGIN
     5  ARG LOG_PUBLIC_KEY
     6  ARG OS_PUBLIC_KEY1
     7  ARG OS_PUBLIC_KEY2
     8  ARG GIT_SEMVER_TAG
     9  # Build environment variables. In addition to routing these through to the make
    10  # command, they MUST also be committed to in the manifest.
    11  ARG BEE
    12  ARG CONSOLE
    13  
    14  # Install dependencies.
    15  RUN apt-get update && apt-get install -y make
    16  RUN apt-get install -y wget
    17  RUN apt-get install -y binutils-arm-none-eabi
    18  RUN apt-get install -y u-boot-tools
    19  
    20  RUN wget "https://github.com/usbarmory/tamago-go/releases/download/tamago-go${TAMAGO_VERSION}/tamago-go${TAMAGO_VERSION}.linux-amd64.tar.gz"
    21  RUN tar -xvf "tamago-go${TAMAGO_VERSION}.linux-amd64.tar.gz" -C /
    22  
    23  WORKDIR /build
    24  
    25  COPY . .
    26  
    27  # Set Tamago path for Make rule.
    28  ENV TAMAGO=/usr/local/tamago-go/bin/go
    29  
    30  # The Makefile expects verifiers to be stored in files, so do that.
    31  RUN echo "${LOG_PUBLIC_KEY}" > /tmp/log.pub
    32  RUN echo "${OS_PUBLIC_KEY1}" > /tmp/os1.pub
    33  RUN echo "${OS_PUBLIC_KEY2}" > /tmp/os2.pub
    34  
    35  # Firmware transparency parameters for output binary.
    36  ENV LOG_ORIGIN=${LOG_ORIGIN} \
    37      LOG_PUBLIC_KEY="/tmp/log.pub" \
    38      OS_PUBLIC_KEY1="/tmp/os1.pub" \
    39      OS_PUBLIC_KEY2="/tmp/os2.pub" \
    40      GIT_SEMVER_TAG=${GIT_SEMVER_TAG} \
    41      BEE=${BEE} \
    42      CONSOLE=${CONSOLE}
    43  
    44  RUN make imx