|
1 | 1 | FROM mcr.microsoft.com/dotnet/sdk:10.0-preview-azurelinux3.0-amd64 AS installer |
2 | 2 |
|
| 3 | +# Install dependencies for building scancode-toolkit |
| 4 | +# pyicu (required by scancode-toolkit) needs ICU development libraries and a C++ compiler |
| 5 | +# The Azure Linux ICU package provides versioned libraries but not unversioned symlinks |
| 6 | +# We need to create the unversioned symlinks that icu-config expects |
| 7 | +# Since network connectivity to Azure Linux repos is problematic, we'll just create the ICU symlinks |
| 8 | +RUN ln -sf /usr/lib/libicuuc.so.72 /usr/lib/libicuuc.so \ |
| 9 | + && ln -sf /usr/lib/libicui18n.so.72 /usr/lib/libicui18n.so \ |
| 10 | + && ln -sf /usr/lib/libicudata.so.72 /usr/lib/libicudata.so \ |
| 11 | + && ln -sf /usr/lib/libicuio.so.72 /usr/lib/libicuio.so \ |
| 12 | + && ln -sf /usr/lib/libicutu.so.72 /usr/lib/libicutu.so \ |
| 13 | + && ln -sf /usr/lib/libicutest.so.72 /usr/lib/libicutest.so |
| 14 | + |
3 | 15 | # Install scancode |
4 | 16 | # Install instructions: https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#installation-as-a-library-via-pip |
5 | 17 | # See latest release at https://github.com/nexB/scancode-toolkit/releases |
| 18 | +# Try to install pyicu from wheel to avoid building from source |
6 | 19 | RUN SCANCODE_VERSION="32.4.0" \ |
7 | 20 | && python3 -m venv /venv \ |
8 | 21 | && source /venv/bin/activate \ |
9 | | - && pip install scancode-toolkit==$SCANCODE_VERSION |
| 22 | + && pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --only-binary=pyicu scancode-toolkit==$SCANCODE_VERSION |
10 | 23 |
|
11 | 24 | FROM mcr.microsoft.com/dotnet/sdk:10.0-preview-azurelinux3.0-amd64 |
12 | 25 |
|
13 | 26 | COPY --from=installer /venv /venv |
14 | 27 |
|
15 | | -# Install necessary dependencies |
| 28 | +# Install necessary dependencies |
| 29 | +# Note: Removed libgomp installation due to network connectivity issues with Azure Linux repos |
| 30 | +# This may affect some scancode functionality that depends on OpenMP |
16 | 31 | RUN tdnf update -y \ |
17 | 32 | && tdnf install -y \ |
18 | | - libgomp \ |
19 | 33 | shadow-utils \ |
20 | 34 | util-linux \ |
21 | 35 | && tdnf clean all |
|
0 commit comments