Dockfile을 통해 설치 하고 싶은데 libc6:i386
왜 항상 실패하는지 모르겠습니다. sudo docker run -it --rm debian:bookworm bash
컨테이너를 실행 하고 들어갈 때 apt search libc6-i386
검색을 이용해서 찾을 수 있습니다 libc6:i386
.
#1 실수:
[+] Building 75.6s (10/25) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.27kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/debian:bookworm 31.8s
=> [ 1/21] FROM docker.io/library/debian:bookworm@sha256:fab22df37377621693c68650b06680c0d8f7c6bf816ec92637944778db3ca2c0 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 931B 0.0s
=> CACHED [ 2/21] RUN dpkg --add-architecture i386 0.0s
=> CACHED [ 3/21] RUN apt-get update -y 0.0s
=> CACHED [ 4/21] RUN apt-get upgrade -y 0.0s
=> [ 5/21] RUN apt-get install net-tools uml-utilities bridge-utils iputils-ping python3 vim openssh-server openssh-client curl gpg psmisc sam 41.9s
=> ERROR [ 6/21] RUN apt-get install libc6:i386 1.9s
------
> [ 6/21] RUN apt-get install libc6:i386:
0.312 Reading package lists...
1.238 Building dependency tree...
1.456 Reading state information...
1.728 The following additional packages will be installed:
1.731 gcc-12-base:i386 libgcc-s1:i386 libidn2-0:i386 libunistring2:i386
1.734 Suggested packages:
1.734 glibc-doc:i386 libc-l10n:i386 locales:i386 libnss-nis:i386
1.734 libnss-nisplus:i386
1.791 The following NEW packages will be installed:
1.793 gcc-12-base:i386 libc6:i386 libgcc-s1:i386 libidn2-0:i386 libunistring2:i386
1.811 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
1.811 Need to get 3283 kB of archives.
1.811 After this operation, 15.0 MB of additional disk space will be used.
1.811 Do you want to continue? [Y/n] Abort.
------
Dockerfile:25
--------------------
23 | -y
24 |
25 | >>> RUN apt-get install libc6:i386
26 | RUN apt-get install lib32stdc++6
27 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install libc6:i386" did not complete successfully: exit code: 1
#2 도커파일:
1 #FROM debian:latest
2 FROM debian:bookworm
3 # for 32bit
4 RUN dpkg --add-architecture i386
5
6 RUN apt-get update -y
7 RUN apt-get upgrade -y
8 RUN apt-get install net-tools \
9 uml-utilities \
10 bridge-utils\
11 iputils-ping \
12 python3 \
13 vim \
14 openssh-server \
15 openssh-client \
16 curl \
17 gpg \
18 psmisc \
19 samba \
20 samba-common \
21 redis \
22 unzip \
23 -y
24
25 #RUN apt-get install libc6:i386
26 RUN apt-get install lib32stdc++6
#3 테스트:
debian12@gyz:~/share/v4vc$ sudo docker run -it --rm debian:bookworm bash
root@491b483e7f0a:/#
root@491b483e7f0a:/# apt search libc6-i386
Sorting... Done
Full Text Search... Done
libc6-i386/stable-security 2.36-9+deb12u3 amd64
GNU C Library: 32-bit shared libraries for AMD64
libc6-i386-amd64-cross/stable 2.36-8cross1 all
GNU C Library: 32-bit shared libraries for AMD64 (for cross-compiling)
libc6-i386-cross/stable 2.36-8cross1 all
GNU C Library: Shared libraries (for cross-compiling)
libc6-i386-x32-cross/stable 2.36-8cross1 all
GNU C Library: 32-bit shared libraries for AMD64 (for cross-compiling)
답변1
문제는 이것이다:
1.811 Do you want to continue? [Y/n] Abort.
apt
계속하기 전에 확인이 필요하지만 비대화형으로 실행되므로 안전 옵션을 선택하고 종료됩니다. 뿐만 아니라 오류와 함께 종료되므로 전체 빌드가 실패합니다.
이전 명령에 사용된 옵션은 apt
"예"라고 가정하여 대답 해야 합니다 .-y
RUN apt-get install -y libc6:i386
RUN apt-get install -y lib32stdc++6
또는
RUN apt-get install -y libc6:i386 lib32stdc++6