@@ -20,24 +20,6 @@ RUN ./configure \
20
20
RUN make
21
21
RUN make install
22
22
23
- # Install libarchive (dependency for the compress-tools crate) - we need only a minimum feature set here
24
- WORKDIR /src
25
- RUN wget https://github.com/libarchive/libarchive/releases/download/v3.6.2/libarchive-3.6.2.tar.gz
26
- RUN tar xf libarchive-3.6.2.tar.gz
27
- WORKDIR /src/libarchive-3.6.2
28
- RUN ./configure \
29
- --prefix=/usr \
30
- --with-openssl \
31
- --without-mbedtls \
32
- --without-nettle \
33
- --without-xml2 \
34
- --without-expat \
35
- --disable-static
36
- RUN make
37
- RUN make install
38
- # there is a bug in the libarchive.pc file which wrongly adds iconv
39
- RUN sed -i "s/iconv //" /usr/lib/pkgconfig/libarchive.pc
40
-
41
23
# build rust-keylime
42
24
COPY . /src/rust-keylime/
43
25
WORKDIR /src/rust-keylime
@@ -65,11 +47,8 @@ LABEL org.opencontainers.image.vendor="The Keylime Authors"
65
47
# NOTE: the cc base image comes with all C runtime dependencies (libc, libm, libgcc, etc.), so no need to copy those
66
48
# TODO: Unfortunately the COPY directive is following links and not preserving the link file. This slightly bloats the image.
67
49
68
- # libarchive is a direct dependency for the compress-tools crate, so we must copy itself and all its dependencies
50
+ # libz is a direct dependency for the zip crate
69
51
COPY --from=builder \
70
- /usr/lib/libarchive.so* \
71
- /lib/x86_64-linux-gnu/liblzma.so* \
72
- /lib/x86_64-linux-gnu/libbz2.so* \
73
52
/lib/x86_64-linux-gnu/libz.so* \
74
53
/usr/lib/x86_64-linux-gnu/
75
54
# tpm2-tss libraries are a dependency (probably not all of them, but we just copy all)
@@ -95,8 +74,5 @@ LABEL install="podman volume create keylime-agent"
95
74
LABEL uninstall="podman volume rm keylime-agent"
96
75
LABEL run="podman run --read-only --name keylime-agent --rm --device /dev/tpm0 --device /dev/tpmrm0 -v keylime-agent:/var/lib/keylime -v /etc/keylime:/etc/keylime:ro --tmpfs /var/lib/keylime/secure:rw,size=1m,mode=0700 -dt IMAGE"
97
76
98
- # Create a system user 'keylime' to allow dropping privileges
99
- RUN useradd -s /sbin/nologin -r -G tss keylime
100
-
101
77
# run as root by default
102
78
USER 0:0
0 commit comments