Repository is not signed in docker build

后端 未结 8 1093
滥情空心
滥情空心 2021-01-31 14:15

I have the following Dockerfile that uses the latest Ubuntu image pulled from dockerhub:

FROM ubuntu:latest  
RUN apt-get update  && apt-get install -y           


        
相关标签:
8条回答
  • 2021-01-31 14:19

    fixed by

    docker image prune -f
    

    looks like docker has a limit on maximum apt cache size on the host system

    0 讨论(0)
  • 2021-01-31 14:19

    As @Danila and @Andriy pointed out this issue can easily be fixed running:

    docker image prune -f
    docker container prune -f
    

    but posting this answer, as running just one of them didn't work for me (on MacOS X) - running both however does.

    0 讨论(0)
  • 2021-01-31 14:20

    If you're using Docker Desktop, take care of the maximum disk image size you've specified in the settings. It can cause the issue if it gets full during the build.

    0 讨论(0)
  • 2021-01-31 14:24

    I deleted lots of images then it fixed my problem.

    0 讨论(0)
  • 2021-01-31 14:30

    I had this problem on one of my two machines. Doing a ls -ld /tmp I got

    drwxrwxrwt 3 root root 4096 May 15 20:46 /tmp
    

    for the working one and

    drwxr-xr-t 1 root root 4096 May 26 05:44 /tmp
    

    for the failing one. After I did chmod 1777 /tmp, it worked!!

    EDIT:

    So, I dived a little deeper into this problem and realized there was something fundamentally wrong. I put my problems in another question and later found the answer that solved this myself: https://stackoverflow.com/a/62088961/7387935

    The key point here is that on the machine that was working correctly I had aufs as storage driver and on the faulty one it was overlay2. After I changed that, all peissions were correct.

    0 讨论(0)
  • 2021-01-31 14:31

    Apparently my root partition was full (maybe I've tried too many times to download packages through apt), and running sudo apt clean solved the issue

    0 讨论(0)
提交回复
热议问题