1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
FROM ghcr.io/tpm2-software/ubuntu-22.04:latest
# Install Rust toolchain
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN apt-get update -y -qq && \
apt-get install --assume-yes --no-install-recommends \
ca-certificates \
clang \
emacs \
libclang-dev \
libsofthsm2 \
libsqlite3-dev \
libssl-dev \
nettle-dev \
make \
org-mode \
pkg-config \
libtss2-dev \
tpm2-tools \
&& \
apt-get clean
COPY Cargo.toml Cargo.lock /app/
COPY tools /app/tools
WORKDIR /app
RUN mkdir .cargo
RUN mkdir src
RUN touch src/main.rs
RUN cargo vendor > .cargo/config
COPY src /app/src
RUN rm src/main.rs
RUN cargo build -p sequoia-tpm-tools
COPY README.org /app/
RUN emacs -Q --batch --eval " \
(progn \
(require 'ob-tangle) \
(dolist (file command-line-args-left) \
(with-current-buffer (find-file-noselect file) \
(org-babel-tangle))))" README.org
RUN /bin/bash -x ./README.sh
RUN cargo test
RUN cargo clippy -- -A clippy::style -A clippy::complexity
|