W pliku dokującym, muszę uaktualnić binutils w wersji (2.32-R0) (dla problemów twistlock), zamiast (2.30-R2) pochodzi z pakietu zbudowanego. Jak to osiągnąć?

 "Step 1/22 : FROM alpine:3.7.3
  Step 2/22 : RUN apk update
  Step 3/22 : RUN apk add --no-cache --virtual .build-deps build-base
 ---> Running in ed8a939e861c
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/21) Upgrading musl (1.1.18-r3 -> 1.1.18-r4)
(2/21) Installing binutils-libs (2.30-r2)
(3/21) Installing binutils (2.30-r2)
(4/21) Installing gmp (6.1.2-r1)
(5/21) Installing isl (0.18-r0)
(6/21) Installing libgomp (6.4.0-r5)
(7/21) Installing libatomic (6.4.0-r5)
(8/21) Installing pkgconf (1.3.10-r0)
(9/21) Installing libgcc (6.4.0-r5)
(10/21) Installing mpfr3 (3.1.5-r1)
(11/21) Installing mpc1 (1.0.3-r1)
(12/21) Installing libstdc++ (6.4.0-r5)
(13/21) Installing gcc (6.4.0-r5)
(14/21) Installing musl-dev (1.1.18-r4)
(15/21) Installing libc-dev (0.7.1-r0)
(16/21) Installing g++ (6.4.0-r5)
(17/21) Installing make (4.2.1-r0)
(18/21) Installing fortify-headers (0.9-r0)
(19/21) Installing build-base (0.5-r0)
(20/21) Installing .build-deps (0)
(21/21) Upgrading musl-utils (1.1.18-r3 -> 1.1.18-r4)
Executing busybox-1.27.2-r11.trigger
OK: 160 MiB in 32 packages
Removing intermediate container ed8a939e861c
 ---> 016647d36ca9"

after this command executed, i tried to add the below command 


 RUN apk add --no-cache --update \
      binutils=2.32-r0
    
but it throws contraint error.
0
Pradeep N.V.S 4 sierpień 2020, 15:24

1 odpowiedź

Najlepsza odpowiedź

Powinieneś zainstalować tę wersję z V3.10, jak Twój obraz bazowy będzie spojrzał na w V3.7, który zawiera Starsza wersja 2.30.0r.

RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main/ binutils=2.32-r0

Dane wyjściowe kompilacji

Step 2/2 : RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main/ binutils=2.32-r0
 ---> Running in ab9f30c693dd
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/1) Installing binutils (2.32-r0)
Executing busybox-1.27.2-r11.trigger

Dla sqlite.

FROM alpine:3.7.3
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main/ binutils=2.32-r0
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.12/main sqlite=3.32.1-r0

2
Adiii 4 sierpień 2020, 13:35