mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-21 06:24:23 +01:00
Without this library the builds are failing with the following error:
```
...
error: failed to run custom build command for `devicemapper-sys v0.1.5`
Caused by: process didn't exit successfully:
`/kata-containers/src/agent/target/release/build/devicemapper-sys-d8eae524a127e049/build-script-build`
(exit status: 101) --- stderr thread 'main' panicked at 'Unable to
find libclang: "couldn't find any valid shared libraries matching:
['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'],
set the `LIBCLANG_PATH` environment variable to a path where one of
these files can be found (invalid: [])"',
/root/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.63.0/./lib.rs:2338:31
```
Fixes: #7580
Signed-off-by: Suraj Deshmukh <suraj.deshmukh@microsoft.com>
61 lines
1.9 KiB
Docker
61 lines
1.9 KiB
Docker
# Copyright (c) 2018 Yash Jain, 2022 IBM Corp.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
ARG IMAGE_REGISTRY=docker.io
|
|
|
|
# Install skopeo which is not included in 20.04 release
|
|
# This can be removed when we upgrade the base to 22.04 release
|
|
FROM ${IMAGE_REGISTRY}/golang:1.18 AS skopeo
|
|
@SET_PROXY@
|
|
WORKDIR /skopeo
|
|
ARG SKOPEO_VERSION
|
|
# hadolint ignore=DL4006
|
|
RUN curl -fsSL "https://github.com/containers/skopeo/archive/v${SKOPEO_VERSION}.tar.gz" \
|
|
| tar -xzf - --strip-components=1
|
|
RUN CGO_ENABLED=0 DISABLE_DOCS=1 make BUILDTAGS=containers_image_openpgp GO_DYN_FLAGS=
|
|
|
|
FROM ${IMAGE_REGISTRY}/ubuntu:@OS_VERSION@
|
|
@SET_PROXY@
|
|
|
|
# makedev tries to mknod from postinst
|
|
RUN [ -x /usr/bin/systemd-detect-virt ] || ( echo "echo docker" >/usr/bin/systemd-detect-virt && chmod +x /usr/bin/systemd-detect-virt )
|
|
# hadolint ignore=DL3009,SC2046
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive \
|
|
apt-get --no-install-recommends -y install \
|
|
ca-certificates \
|
|
curl \
|
|
g++ \
|
|
$(gcc_arch="@ARCH@" && [ "$(uname -m)" != "$gcc_arch" ] && ( \
|
|
libc_arch="$gcc_arch" && \
|
|
[ "$gcc_arch" = aarch64 ] && libc_arch=arm64; \
|
|
[ "$gcc_arch" = ppc64le ] && gcc_arch=powerpc64le && libc_arch=ppc64el; \
|
|
[ "$gcc_arch" = s390x ] && gcc_arch=s390x && libc_arch=s390x; \
|
|
[ "$gcc_arch" = x86_64 ] && gcc_arch=x86-64 && libc_arch=amd64; \
|
|
echo "gcc-$gcc_arch-linux-gnu libc6-dev-$libc_arch-cross")) \
|
|
git \
|
|
golang-go \
|
|
libdevmapper-dev \
|
|
libgpgme-dev \
|
|
libssl-dev \
|
|
make \
|
|
makedev \
|
|
multistrap \
|
|
musl-tools \
|
|
pkg-config \
|
|
protobuf-compiler \
|
|
gettext-base \
|
|
umoci \
|
|
kmod \
|
|
clang
|
|
|
|
# aarch64 requires this name -- link for all
|
|
RUN ln -s /usr/bin/musl-gcc "/usr/bin/$(uname -m)-linux-musl-gcc"
|
|
|
|
COPY --from=skopeo /skopeo/bin/skopeo /usr/local/bin/
|
|
COPY --from=skopeo /skopeo/default-policy.json /etc/containers/policy.json
|
|
|
|
@INSTALL_RUST@
|
|
@INSTALL_AA_KBC@
|