docker-node icon indicating copy to clipboard operation
docker-node copied to clipboard

update-ca-certificates: not found

Open rpaterson opened this issue 1 year ago • 2 comments

Environment

  • Platform: Linux
  • Docker Version: 27.3.1, build ce12230
  • Node.js Version: 18.20.5
  • Image Tag: node:18.20.5-alpine3.21

Expected Behavior

update-ca-certificates utility should be present and run successfully.

Current Behavior

RUN update-ca-certificates fails with "update-ca-certificates: not found":

 => ERROR [4/8] RUN update-ca-certificates                                                                                                                                               0.2s
------                                                                                                                                                                                        
 > [4/8] RUN update-ca-certificates:
0.159 /bin/sh: update-ca-certificates: not found
------
Dockerfile:17
--------------------
  15 |     
  16 |     COPY schema/global-bundle.pem /usr/local/share/ca-certificates/global-bundle.pem
  17 | >>> RUN update-ca-certificates
  18 |     
  19 |     WORKDIR /card
--------------------
ERROR: failed to solve: process "/bin/sh -c update-ca-certificates" did not complete successfully: exit code: 127

Possible Solution

Steps to Reproduce

Additional Information

RUN update-ca-certificates works on node:18.20.5-alpine3.20, this regression was introduced in node:18.20.5-alpine3.21

rpaterson avatar Dec 11 '24 09:12 rpaterson

same here with node:20-alpine3.21. Rolled back to 3.20 for now

avalor1 avatar Dec 11 '24 10:12 avalor1

It's possible that the script was installed with ca-certificates by default in previous version and it is not the case with the new one. You can fix this by explicitly installing ca-certificate.

RUN apk add ca-certificates && update-ca-certificates

LaurentGoderre avatar Dec 11 '24 16:12 LaurentGoderre