Skip to content

After modifying the API module, unable to rebuild the image #13979

Closed

Description

@sukai-cheng

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.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

log is here !

root@gxkj-ai:~/workspace/dify# docker build --progress=plain -t langgenius/dify-api:0.15.3-20250218 api
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2.78kB done
#1 DONE 0.0s

#2 [internal] load metadata for crpi-xq8x514pjb5ldhr4.cn-hangzhou.personal.cr.aliyuncs.com/htxc/python:3.12-slim-bookworm
#2 DONE 0.3s

#3 [internal] load .dockerignore
#3 transferring context: 125B done
#3 DONE 0.0s

#4 [base 1/3] FROM crpi-xq8x514pjb5ldhr4.cn-hangzhou.personal.cr.aliyuncs.com/htxc/python:3.12-slim-bookworm@sha256:ef2591f67718327308120212ff96813a64a0316a487fa55f8dc89ae34cb34d44
#4 DONE 0.0s

#5 [base 3/3] RUN pip install --no-cache-dir poetry==2.0.1 -i https://mirrors.aliyun.com/pypi/simple/
#5 CACHED

#6 [base 2/3] WORKDIR /app/api
#6 CACHED

#7 [production 1/8] WORKDIR /app/api
#7 CACHED

#8 [packages 1/4] RUN sed -i 's@http://deb.debian.org@http://mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/debian.sources
#8 CACHED

#9 [internal] load build context
#9 transferring context: 319.48kB 0.2s done
#9 DONE 0.2s

#10 [packages 2/4] RUN apt-get update --allow-unauthenticated && apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev
#10 0.317 Get:1 http://mirrors.ustc.edu.cn/debian bookworm InRelease [2578 B]
#10 0.318 Err:1 http://mirrors.ustc.edu.cn/debian bookworm InRelease
#10 0.318   Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
#10 0.343 Get:2 http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease [2578 B]
#10 0.343 Err:2 http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease
#10 0.343   Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
#10 0.381 Get:3 http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease [2578 B]
#10 0.381 Err:3 http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease
#10 0.381   Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
#10 0.384 Reading package lists...
#10 0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian bookworm InRelease' is not signed.
#10 0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian/dists/bookworm/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
#10 0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian/dists/bookworm-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
#10 0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease' is not signed.
#10 0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian-security/dists/bookworm-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
#10 0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease' is not signed.
#10 ERROR: process "/bin/sh -c apt-get update --allow-unauthenticated && apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev" did not complete successfully: exit code: 100

#11 [production 2/8] RUN     apt-get update     && apt-get install -y --no-install-recommends         curl nodejs libgmp-dev libmpfr-dev libmpc-dev         expat libldap-2.5-0 perl libsqlite3-0 zlib1g         fonts-noto-cjk         media-types         libmagic1     && apt-get autoremove -y     && rm -rf /var/lib/apt/lists/*
#11 CANCELED
------
 > [packages 2/4] RUN apt-get update --allow-unauthenticated && apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev:
0.381 Get:3 http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease [2578 B]
0.381 Err:3 http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease
0.381   Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
0.384 Reading package lists...
0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian bookworm InRelease' is not signed.
0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian/dists/bookworm/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian/dists/bookworm-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease' is not signed.
0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian-security/dists/bookworm-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease' is not signed.
------
Dockerfile:26
--------------------
  24 |     # RUN sed -i 's@deb.debian.org@mirrors.aliyun.com@g' /etc/apt/sources.list.d/debian.sources
  25 |     RUN sed -i 's@http://deb.debian.org@http://mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/debian.sources
  26 | >>> RUN apt-get update --allow-unauthenticated && apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev
  27 |     # Install Python dependencies
  28 |     COPY pyproject.toml poetry.lock ./
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update --allow-unauthenticated && apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev" did not complete successfully: exit code: 100
Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Activity

  1. added
    🐞 bug
    on Feb 19, 2025
  2. dosubot commented on Feb 19, 2025

    @dosubot

    To resolve the issue of failing to rebuild the Docker image due to errors related to unsigned repositories and network authentication, you can try the following steps:

    1. Ensure Repository Signatures: Make sure that the repositories you are using in your Dockerfile are properly signed. Add the necessary GPG keys for the repositories you are using.

    2. Use Secure Repositories: If you are using a mirror or a custom repository, ensure it is a secure and trusted source. Consider switching to the official Debian repositories if you are facing issues with a mirror.

    3. Network Configuration: Check your network configuration to ensure there are no issues with DNS or network access. You can try adding a DNS server in your Dockerfile:

      RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf
    4. Update the Dockerfile: If you are located in China or facing network issues, you can uncomment the line to use the Aliyun mirror, which might help in resolving network-related issues:

      # RUN sed -i 's@deb.debian.org@mirrors.aliyun.com@g' /etc/apt/sources.list.d/debian.sources
    5. Debugging: Add debugging information to your Dockerfile to get more insights into what might be going wrong. You can add apt-get update with the -o Debug::pkgProblemResolver=true option to get more detailed output.

    These steps should help address the issues you're encountering with the Docker build process [1].

    To continue talking to Dosu, mention @dosu.


    Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

  3. sukai-cheng commented on Feb 19, 2025

    @sukai-cheng
    Author

    ERROR: failed to solve: process "/bin/sh -c echo "nameserver 8.8.8.8" > /etc/resolv.conf" did not complete successfully: exit code: 2

  4. sukai-cheng commented on Feb 19, 2025

    @sukai-cheng
    Author

    are you kidding me? i have tried several ways, pls give solution, many develpper have tripped down here !!!

  5. dosubot commented on Feb 19, 2025

    @dosubot

    It seems like this issue requires a deeper look, @takatost could you please lend your expertise?

    To continue talking to Dosu, mention @dosu.


    Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

  6. crazywoola commented on Feb 19, 2025

    @crazywoola
    Member

    We do not provide support for build images by your own, please contact business@dify.ai for technical support.
    Duplicated #13919

    #10 0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian bookworm InRelease' is not signed.
    #10 0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian/dists/bookworm/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
    #10 0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian/dists/bookworm-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
    #10 0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease' is not signed.
    #10 0.392 E: Failed to fetch http://mirrors.ustc.edu.cn/debian-security/dists/bookworm-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
    #10 0.392 E: The repository 'http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease' is not signed.
    #10 ERROR: process "/bin/sh -c apt-get update --allow-unauthenticated && apt-get install -y --no-install-recommends gcc g++ libc-dev libffi-dev libgmp-dev libmpfr-dev libmpc-dev" did not complete successfully: exit code: 100
    
    

    From the logs you provided, it seems you are not using the official packages as well.
    Also you should be able to resolve it by yourself. As you can see, we can not reproduce this error, since the CI is working as expected.

  7. added
    🌚 invalid
    and removed
    🐞 bug
    on Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🌚 invalid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions