도커 빌드 실패
삽질
main
date
Aug 11, 2025
slug
docker-build-failed
author
status
Public
tags
issue
summary
삽질
type
Post
thumbnail
category
Development
updatedAt
Oct 12, 2025 01:10 PM
크롤러 서버 코드 수정 후 배포 안됨
-> 처음 에러 메시지 gpg 키 관련 에러메세지로 apt-update가 안됨
/9] RUN apt-get dist-upgrade && apt-get update && apt-get install ... #12 0.284 Reading package lists... #12 0.297 Building dependency tree... #12 0.298 Reading state information... #12 0.301 Calculating upgrade... #12 0.310 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. #12 0.424 Get:1 [<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm InRelease [151 kB] #12 0.439 Get:2 [<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm-updates InRelease [55.4 kB] #12 0.440 Get:3 [<http://deb.debian.org/debian-security>](<http://deb.debian.org/debian-security>) bookworm-security InRelease [48.0 kB] #12 0.521 Err:1 [<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm InRelease #12 0.521 At least one invalid signature was encountered. #12 0.584 Err:2 [<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm-updates InRelease #12 0.584 At least one invalid signature was encountered. #12 0.649 Err:3 [<http://deb.debian.org/debian-security>](<http://deb.debian.org/debian-security>) bookworm-security InRelease #12 0.649 At least one invalid signature was encountered. #12 0.655 Reading package lists... #12 0.667 W: GPG error: [<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm InRelease: At least one invalid signature was encountered. #12 0.667 E: The repository '[<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm InRelease' is not signed. #12 0.667 W: GPG error: [<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm-updates InRelease: At least one invalid signature was encountered. #12 0.667 E: The repository '[<http://deb.debian.org/debian>](<http://deb.debian.org/debian>) bookworm-updates InRelease' is not signed. #12 0.667 W: GPG error: [<http://deb.debian.org/debian-security>](<http://deb.debian.org/debian-security>) bookworm-security InRelease: At least one invalid signature was encountered. #12 0.667 E: The repository '[<http://deb.debian.org/debian-security>](<http://deb.debian.org/debian-security>) bookworm-security InRelease' is not signed. #12 ERROR: process "/bin/sh -c apt-get dist-upgrade && apt-get update && apt-get install -y apt-utils python3-venv libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libx11-6 libgconf-2-4 libfontconfig1 libasound2 chromium chromium-driver git && apt-get clean && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100 ------ > [2/9] RUN apt-get dist-upgrade && apt-get update && apt-get install -y apt-utils python3-venv libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libx11-6 libgconf-2-4 libfontconfig1 libasound2 chromium chromium-driver git && apt-get clean && rm -rf /var/lib/apt/lists/*:
해당 이미지 키 관련 에러로 보여서 도커 파일 스크립트에 키 최신화 하는 스크립트를 추가했지만 여전히 에러 발생으로 배포가 되지 않음
FROM python:3.11-slim ## 키 업데이트 RUN rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* \\ && apt-get update --allow-insecure-repositories \\ && apt-get install -y --no-install-recommends --allow-unauthenticated curl gnupg ca-certificates \\ && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* # 패키지 업데이트 및 필요한 패키지 설치 RUN apt-get update \\
새로운 에러 메시지 (용량 없음)
#5 4.461 After this operation, 19.8 MB of additional disk space will be used. #5 4.461 E: You don't have enough free space in /var/cache/apt/archives/.
그리고 나서 도커 데몬 내려감....
Running with gitlab-runner 17.0.0 (44feccdf) on gitlab-runner JgbyH96rz, system ID: r_RvIF7uT23wer Preparing the "docker" executor 00:09 ERROR: Failed to remove network for build ERROR: Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:951:0s) Will be retried in 3s ... ERROR: Failed to remove network for build ERROR: Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:951:0s) Will be retried in 3s ... ERROR: Failed to remove network for build ERROR: Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:951:0s) Will be retried in 3s ... ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:951:0s)
배포를 깃랩 러너를 통하여 하고 있어서 깃랩 서버 용량 체크 해보니 100% 꽉차있음
깃랩 컨테이너를 제외한 aws관련 이미지만 삭제해야함
안쓰는 이미지 지우고 재시도하니 배포 됨
우선 깃랩 서버의 overlay2 폴더가 대부분의 용량을 차지하고 있음
도커와 소스 코드 용량 합쳐봐야 100기가도 안됨 → overlay가 190기가 이상 차지
우선 도커 리소스는 정리했는데 이마저도 고작 10기가 정도만 확보됨
음..