Skip to content

docker build problem #10741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 tasks done
Patientrookie opened this issue Nov 15, 2024 · 3 comments
Closed
5 tasks done

docker build problem #10741

Patientrookie opened this issue Nov 15, 2024 · 3 comments

Comments

@Patientrookie
Copy link

Patientrookie commented Nov 15, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

docker build --platform=linux/amd64 -t myImage .
[+] Building 45.9s (10/17)                                                                                                                           docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                 0.0s
 => => transferring dockerfile: 2.59kB                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/python:3.10-slim-bookworm                                                                                         2.6s
 => [internal] load .dockerignore                                                                                                                                    0.0s
 => => transferring context: 125B                                                                                                                                    0.0s
 => [base 1/3] FROM docker.io/library/python:3.10-slim-bookworm@sha256:af6f1b19eae3400ea3a569ba92d4819a527be4662971d51bb798c923bba30a81                              0.0s
 => [internal] load build context                                                                                                                                    0.3s
 => => transferring context: 607.63kB                                                                                                                                0.3s
 => CACHED [base 2/3] WORKDIR /app/api                                                                                                                               0.0s
 => CACHED [base 3/3] RUN pip install --no-cache-dir poetry==1.8.4                                                                                                   0.0s
 => CANCELED [packages 1/3] RUN apt-get update     && apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev      43.3s
 => CACHED [production 1/7] WORKDIR /app/api                                                                                                                         0.0s
 => ERROR [production 2/7] RUN apt-get update     && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev     && echo "deb htt  43.2s
------                                                                                                                                                                    
 > [production 2/7] RUN apt-get update     && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev     && echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list     && apt-get update     && apt-get install -y --no-install-recommends expat=2.6.3-2 libldap-2.5-0=2.5.18+dfsg-3+b1 perl=5.40.0-7 libsqlite3-0=3.46.1-1 zlib1g=1:1.3.dfsg+really1.3.1-1+b1     && apt-get install -y fonts-noto-cjk     && apt-get autoremove -y     && rm -rf /var/lib/apt/lists/*:
1.150 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
1.910 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
2.671 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
4.079 Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8789 kB]
4.681 Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [2468 B]
5.576 Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [204 kB]
5.640 Fetched 9250 kB in 5s (1711 kB/s)
5.640 Reading package lists...
6.158 Reading package lists...
6.648 Building dependency tree...
6.782 Reading state information...
7.076 The following additional packages will be installed:
7.077   libbrotli1 libc-ares2 libcurl4 libgmpxx4ldbl libicu72 libldap-2.5-0 libmpc3
7.077   libmpfr6 libnghttp2-14 libnode108 libpsl5 librtmp1 libsasl2-2
7.077   libsasl2-modules-db libssh2-1 libuv1 node-acorn node-busboy
7.078   node-cjs-module-lexer node-undici node-xtend
7.079 Suggested packages:
7.079   gmp-doc libgmp10-doc libmpfr-doc npm
7.079 Recommended packages:
7.079   libldap-common publicsuffix libsasl2-modules nodejs-doc
7.230 The following NEW packages will be installed:
7.230   curl libbrotli1 libc-ares2 libcurl4 libgmp-dev libgmpxx4ldbl libicu72
7.230   libldap-2.5-0 libmpc-dev libmpc3 libmpfr-dev libmpfr6 libnghttp2-14
7.230   libnode108 libpsl5 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1 libuv1
7.230   node-acorn node-busboy node-cjs-module-lexer node-undici node-xtend nodejs
8.205 0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
8.205 Need to get 24.6 MB of archives.
8.205 After this operation, 101 MB of additional disk space will be used.
8.205 Get:1 http://deb.debian.org/debian bookworm/main amd64 libbrotli1 amd64 1.0.9-2+b6 [275 kB]
9.051 Get:2 http://deb.debian.org/debian bookworm/main amd64 libsasl2-modules-db amd64 2.1.28+dfsg-10 [20.3 kB]
9.888 Get:3 http://deb.debian.org/debian bookworm/main amd64 libsasl2-2 amd64 2.1.28+dfsg-10 [59.7 kB]
10.84 Get:4 http://deb.debian.org/debian bookworm/main amd64 libldap-2.5-0 amd64 2.5.13+dfsg-5 [183 kB]
11.70 Get:5 http://deb.debian.org/debian bookworm/main amd64 libnghttp2-14 amd64 1.52.0-1+deb12u2 [73.0 kB]
12.53 Get:6 http://deb.debian.org/debian bookworm/main amd64 libpsl5 amd64 0.21.2-1 [58.7 kB]
13.38 Get:7 http://deb.debian.org/debian bookworm/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2+b2 [60.8 kB]
14.32 Get:8 http://deb.debian.org/debian bookworm/main amd64 libssh2-1 amd64 1.10.0-3+b1 [179 kB]
15.29 Get:9 http://deb.debian.org/debian bookworm/main amd64 libcurl4 amd64 7.88.1-10+deb12u8 [390 kB]
16.29 Get:10 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u8 [315 kB]
17.18 Get:11 http://deb.debian.org/debian bookworm/main amd64 libc-ares2 amd64 1.18.1-3 [102 kB]
18.19 Get:12 http://deb.debian.org/debian bookworm/main amd64 libgmpxx4ldbl amd64 2:6.2.1+dfsg1-1.1 [338 kB]
19.39 Get:13 http://deb.debian.org/debian bookworm/main amd64 libgmp-dev amd64 2:6.2.1+dfsg1-1.1 [641 kB]
20.88 Get:14 http://deb.debian.org/debian bookworm/main amd64 libicu72 amd64 72.1-3 [9376 kB]
22.04 Get:15 http://deb.debian.org/debian bookworm/main amd64 libmpfr6 amd64 4.2.0-1 [701 kB]
22.84 Get:16 http://deb.debian.org/debian bookworm/main amd64 libmpc3 amd64 1.3.1-1 [51.5 kB]
23.76 Get:17 http://deb.debian.org/debian bookworm/main amd64 libmpfr-dev amd64 4.2.0-1 [259 kB]
24.70 Get:18 http://deb.debian.org/debian bookworm/main amd64 libmpc-dev amd64 1.3.1-1 [63.9 kB]
25.61 Get:19 http://deb.debian.org/debian bookworm/main amd64 libuv1 amd64 1.44.2-1+deb12u1 [136 kB]
26.21 Get:20 http://deb.debian.org/debian bookworm/main amd64 node-xtend all 4.0.2-3 [3932 B]
27.22 Get:21 http://deb.debian.org/debian bookworm/main amd64 nodejs amd64 18.19.0+dfsg-6~deb12u2 [319 kB]
28.07 Get:22 http://deb.debian.org/debian bookworm/main amd64 node-acorn all 8.8.1+ds+~cs25.17.7-2 [128 kB]
28.80 Get:23 http://deb.debian.org/debian bookworm/main amd64 node-cjs-module-lexer all 1.2.2+dfsg-5 [30.1 kB]
29.48 Get:24 http://deb.debian.org/debian bookworm/main amd64 node-busboy all 1.6.0+~cs2.6.0-2 [16.9 kB]
30.41 Get:25 http://deb.debian.org/debian bookworm/main amd64 node-undici all 5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4 [285 kB]
31.83 Get:26 http://deb.debian.org/debian bookworm/main amd64 libnode108 amd64 18.19.0+dfsg-6~deb12u2 [10.5 MB]
32.09 debconf: delaying package configuration, since apt-utils is not installed
32.14 Fetched 24.6 MB in 25s (998 kB/s)
32.22 Selecting previously unselected package libbrotli1:amd64.
(Reading database ... 6686 files and directories currently installed.)
32.22 Preparing to unpack .../00-libbrotli1_1.0.9-2+b6_amd64.deb ...
32.23 Unpacking libbrotli1:amd64 (1.0.9-2+b6) ...
32.33 Selecting previously unselected package libsasl2-modules-db:amd64.
32.33 Preparing to unpack .../01-libsasl2-modules-db_2.1.28+dfsg-10_amd64.deb ...
32.33 Unpacking libsasl2-modules-db:amd64 (2.1.28+dfsg-10) ...
32.42 Selecting previously unselected package libsasl2-2:amd64.
32.42 Preparing to unpack .../02-libsasl2-2_2.1.28+dfsg-10_amd64.deb ...
32.43 Unpacking libsasl2-2:amd64 (2.1.28+dfsg-10) ...
32.52 Selecting previously unselected package libldap-2.5-0:amd64.
32.52 Preparing to unpack .../03-libldap-2.5-0_2.5.13+dfsg-5_amd64.deb ...
32.53 Unpacking libldap-2.5-0:amd64 (2.5.13+dfsg-5) ...
32.63 Selecting previously unselected package libnghttp2-14:amd64.
32.63 Preparing to unpack .../04-libnghttp2-14_1.52.0-1+deb12u2_amd64.deb ...
32.63 Unpacking libnghttp2-14:amd64 (1.52.0-1+deb12u2) ...
32.72 Selecting previously unselected package libpsl5:amd64.
32.72 Preparing to unpack .../05-libpsl5_0.21.2-1_amd64.deb ...
32.72 Unpacking libpsl5:amd64 (0.21.2-1) ...
32.82 Selecting previously unselected package librtmp1:amd64.
32.82 Preparing to unpack .../06-librtmp1_2.4+20151223.gitfa8646d.1-2+b2_amd64.deb ...
32.82 Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2+b2) ...
32.91 Selecting previously unselected package libssh2-1:amd64.
32.91 Preparing to unpack .../07-libssh2-1_1.10.0-3+b1_amd64.deb ...
32.91 Unpacking libssh2-1:amd64 (1.10.0-3+b1) ...
33.01 Selecting previously unselected package libcurl4:amd64.
33.01 Preparing to unpack .../08-libcurl4_7.88.1-10+deb12u8_amd64.deb ...
33.01 Unpacking libcurl4:amd64 (7.88.1-10+deb12u8) ...
33.12 Selecting previously unselected package curl.
33.12 Preparing to unpack .../09-curl_7.88.1-10+deb12u8_amd64.deb ...
33.12 Unpacking curl (7.88.1-10+deb12u8) ...
33.23 Selecting previously unselected package libc-ares2:amd64.
33.23 Preparing to unpack .../10-libc-ares2_1.18.1-3_amd64.deb ...
33.23 Unpacking libc-ares2:amd64 (1.18.1-3) ...
33.33 Selecting previously unselected package libgmpxx4ldbl:amd64.
33.33 Preparing to unpack .../11-libgmpxx4ldbl_2%3a6.2.1+dfsg1-1.1_amd64.deb ...
33.33 Unpacking libgmpxx4ldbl:amd64 (2:6.2.1+dfsg1-1.1) ...
33.42 Selecting previously unselected package libgmp-dev:amd64.
33.42 Preparing to unpack .../12-libgmp-dev_2%3a6.2.1+dfsg1-1.1_amd64.deb ...
33.42 Unpacking libgmp-dev:amd64 (2:6.2.1+dfsg1-1.1) ...
33.53 Selecting previously unselected package libicu72:amd64.
33.54 Preparing to unpack .../13-libicu72_72.1-3_amd64.deb ...
33.54 Unpacking libicu72:amd64 (72.1-3) ...
34.05 Selecting previously unselected package libmpfr6:amd64.
34.05 Preparing to unpack .../14-libmpfr6_4.2.0-1_amd64.deb ...
34.06 Unpacking libmpfr6:amd64 (4.2.0-1) ...
34.17 Selecting previously unselected package libmpc3:amd64.
34.17 Preparing to unpack .../15-libmpc3_1.3.1-1_amd64.deb ...
34.17 Unpacking libmpc3:amd64 (1.3.1-1) ...
34.26 Selecting previously unselected package libmpfr-dev:amd64.
34.26 Preparing to unpack .../16-libmpfr-dev_4.2.0-1_amd64.deb ...
34.27 Unpacking libmpfr-dev:amd64 (4.2.0-1) ...
34.37 Selecting previously unselected package libmpc-dev:amd64.
34.37 Preparing to unpack .../17-libmpc-dev_1.3.1-1_amd64.deb ...
34.37 Unpacking libmpc-dev:amd64 (1.3.1-1) ...
34.46 Selecting previously unselected package libuv1:amd64.
34.47 Preparing to unpack .../18-libuv1_1.44.2-1+deb12u1_amd64.deb ...
34.47 Unpacking libuv1:amd64 (1.44.2-1+deb12u1) ...
34.56 Selecting previously unselected package node-xtend.
34.56 Preparing to unpack .../19-node-xtend_4.0.2-3_all.deb ...
34.56 Unpacking node-xtend (4.0.2-3) ...
34.65 Selecting previously unselected package nodejs.
34.65 Preparing to unpack .../20-nodejs_18.19.0+dfsg-6~deb12u2_amd64.deb ...
34.65 Unpacking nodejs (18.19.0+dfsg-6~deb12u2) ...
34.76 Selecting previously unselected package node-acorn.
34.76 Preparing to unpack .../21-node-acorn_8.8.1+ds+~cs25.17.7-2_all.deb ...
34.77 Unpacking node-acorn (8.8.1+ds+~cs25.17.7-2) ...
34.86 Selecting previously unselected package node-cjs-module-lexer.
34.86 Preparing to unpack .../22-node-cjs-module-lexer_1.2.2+dfsg-5_all.deb ...
34.86 Unpacking node-cjs-module-lexer (1.2.2+dfsg-5) ...
34.95 Selecting previously unselected package node-busboy.
34.95 Preparing to unpack .../23-node-busboy_1.6.0+~cs2.6.0-2_all.deb ...
34.96 Unpacking node-busboy (1.6.0+~cs2.6.0-2) ...
35.05 Selecting previously unselected package node-undici.
35.05 Preparing to unpack .../24-node-undici_5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4_all.deb ...
35.10 Unpacking node-undici (5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4) ...
35.21 Selecting previously unselected package libnode108:amd64.
35.21 Preparing to unpack .../25-libnode108_18.19.0+dfsg-6~deb12u2_amd64.deb ...
35.21 Unpacking libnode108:amd64 (18.19.0+dfsg-6~deb12u2) ...
35.70 Setting up libpsl5:amd64 (0.21.2-1) ...
35.70 Setting up libicu72:amd64 (72.1-3) ...
35.71 Setting up libbrotli1:amd64 (1.0.9-2+b6) ...
35.71 Setting up libnghttp2-14:amd64 (1.52.0-1+deb12u2) ...
35.72 Setting up node-cjs-module-lexer (1.2.2+dfsg-5) ...
35.72 Setting up libc-ares2:amd64 (1.18.1-3) ...
35.73 Setting up libsasl2-modules-db:amd64 (2.1.28+dfsg-10) ...
35.73 Setting up libgmpxx4ldbl:amd64 (2:6.2.1+dfsg1-1.1) ...
35.74 Setting up libuv1:amd64 (1.44.2-1+deb12u1) ...
35.74 Setting up libmpfr6:amd64 (4.2.0-1) ...
35.75 Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2+b2) ...
35.75 Setting up libmpc3:amd64 (1.3.1-1) ...
35.76 Setting up libsasl2-2:amd64 (2.1.28+dfsg-10) ...
35.76 Setting up libssh2-1:amd64 (1.10.0-3+b1) ...
35.77 Setting up node-xtend (4.0.2-3) ...
35.77 Setting up node-busboy (1.6.0+~cs2.6.0-2) ...
35.77 Setting up libgmp-dev:amd64 (2:6.2.1+dfsg1-1.1) ...
35.78 Setting up libmpfr-dev:amd64 (4.2.0-1) ...
35.78 Setting up libldap-2.5-0:amd64 (2.5.13+dfsg-5) ...
35.79 Setting up libmpc-dev:amd64 (1.3.1-1) ...
35.79 Setting up node-undici (5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4) ...
35.85 Setting up libcurl4:amd64 (7.88.1-10+deb12u8) ...
35.85 Setting up curl (7.88.1-10+deb12u8) ...
35.86 Setting up node-acorn (8.8.1+ds+~cs25.17.7-2) ...
35.86 Setting up libnode108:amd64 (18.19.0+dfsg-6~deb12u2) ...
35.86 Setting up nodejs (18.19.0+dfsg-6~deb12u2) ...
35.90 update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
35.90 update-alternatives: warning: skip creation of /usr/share/man/man1/js.1.gz because associated file /usr/share/man/man1/nodejs.1.gz (of link group js) doesn't exist
35.90 Processing triggers for libc-bin (2.36-9+deb12u9) ...
37.21 Get:1 http://deb.debian.org/debian testing InRelease [172 kB]
37.71 Hit:2 http://deb.debian.org/debian bookworm InRelease
38.20 Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
38.66 Hit:4 http://deb.debian.org/debian-security bookworm-security InRelease
40.07 Get:5 http://deb.debian.org/debian testing/main amd64 Packages [9356 kB]
41.20 Fetched 9527 kB in 5s (1860 kB/s)
41.20 Reading package lists...
42.08 Reading package lists...
42.91 Building dependency tree...
43.14 Reading state information...
43.15 Package expat is not available, but is referred to by another package.
43.15 This may mean that the package is missing, has been obsoleted, or
43.15 is only available from another source
43.15 
43.15 E: Version '2.6.3-2' for 'expat' was not found
------
Dockerfile:51
--------------------
  50 |     
  51 | >>> RUN apt-get update \
  52 | >>>     && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev \
  53 | >>>     # if you located in China, you can use aliyun mirror to speed up
  54 | >>>     # && echo "deb http://mirrors.aliyun.com/debian testing main" > /etc/apt/sources.list \
  55 | >>>     && echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list \
  56 | >>>     && apt-get update \
  57 | >>>     # For Security
  58 | >>>     && apt-get install -y --no-install-recommends expat=2.6.3-2 libldap-2.5-0=2.5.18+dfsg-3+b1 perl=5.40.0-7 libsqlite3-0=3.46.1-1 zlib1g=1:1.3.dfsg+really1.3.1-1+b1 \
  59 | >>>     # install a chinese font to support the use of tools like matplotlib
  60 | >>>     && apt-get install -y fonts-noto-cjk \
  61 | >>>     && apt-get autoremove -y \
  62 | >>>     && rm -rf /var/lib/apt/lists/*
  63 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update     && apt-get install -y --no-install-recommends curl nodejs libgmp-dev libmpfr-dev libmpc-dev     && echo \"deb http://deb.debian.org/debian testing main\" > /etc/apt/sources.list     && apt-get update     && apt-get install -y --no-install-recommends expat=2.6.3-2 libldap-2.5-0=2.5.18+dfsg-3+b1 perl=5.40.0-7 libsqlite3-0=3.46.1-1 zlib1g=1:1.3.dfsg+really1.3.1-1+b1     && apt-get install -y fonts-noto-cjk     && apt-get autoremove -y     && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/555tpei9irng2inx2qrq5fwuz

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Copy link

dosubot bot commented Nov 15, 2024

It seems like you're encountering an issue with the Docker build process, specifically related to the availability of the expat package version 2.6.3-2. This error typically occurs when the specified version of a package is not available in the repositories you are using.

Here are a couple of steps you can take to resolve this issue:

  1. Check Package Availability: Verify if the expat package version 2.6.3-2 is available in the Debian testing repository. You can do this by visiting the Debian package repository website or using a tool like apt-cache to search for available versions.

  2. Use a Different Version: If the specific version is not available, consider using a different version of the expat package that is available in the repository. You can remove the version specification in your Dockerfile to install the latest available version.

  3. Update Repository Sources: Ensure that your /etc/apt/sources.list is correctly configured to point to the appropriate Debian repositories. Sometimes, using a different mirror or updating the repository list can resolve such issues.

  4. Alternative Package Sources: If the package is critical and not available, you might consider downloading it from an alternative source or building it from source, though this can be more complex.

For further assistance, you might want to check similar discussions or issues. For example, there is an open discussion on a related topic: Docker image build process [1]. This might provide additional insights or solutions that could be applicable to your situation.

To continue talking to Dosu, mention @dosu.

@crazywoola
Copy link
Member

crazywoola commented Nov 15, 2024

Fixed in #10686

Please use proper markdown syntax to format logs :)

@liangnet
Copy link

I have a similar error message but occurred when install perl=5.40.0-7. Finally, I sucessfullt built the image by "perl" instead of "perl=5.40.0-7". The image python:3.12-slim-bookworm will install perl 5.36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants