Skip to content
Stefan Berger edited this page Nov 21, 2019 · 5 revisions

This page has Dockerfiles for building libtpms in a Docker container. Please adapt them for your needs.

Ubuntu 18.04 (from Rui Lopes):

Cut and paste the below into a file called Dockerfile.ubuntu-18.04 in the libtpms directory and follow the instructions in the file.

# usage:
# docker build -t build-libtpms-ubuntu-18.04 -f Dockerfile.ubuntu-18.04 .
# docker run --rm build-libtpms-ubuntu-18.04 | tar --extract --verbose
# docker rmi build-libtpms-ubuntu-18.04
# find build -name '*.deb' | xargs -L1 -i% bash -c 'echo %; dpkg -c %'
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && \
    apt-get -y install build-essential fakeroot devscripts equivs
ADD . /build/src
WORKDIR /build/src
RUN mk-build-deps \
    --install \
    --build-dep \
    '--tool=apt-get --no-install-recommends -y' \
    debian/control
RUN dpkg-buildpackage -b -us -uc -j$(nproc)
ENTRYPOINT tar --create --to-stdout /build/*.deb