[Docker] apk not found 또는 certificate verify failed:ssl 발생 시.
Cloud&Container/IaC 2022. 3. 24. 11:33아래와 같은 에러 발생 시
Step 8/13 : RUN apk add tzdata
---> Running in 7d1593d1239f
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
140460674784072:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.14/main: Permission denied
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
140460674784072:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.14/community: Permission denied
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: No such file or directory
ERROR: unable to select packages:
tzdata (no such package):
required by: world[tzdata]
The command '/bin/sh -c apk add tzdata' returned a non-zero code: 1
제가 사용했던 이미지는 OpenJDK 11 Alpine 입니다.
FROM adoptopenjdk/openjdk11:alpine
Timezone 설정을 위해서
RUN apk add tzdata
를 Dockerfile 에 추가 했는데 에러가 발생을 했습니다.
찾아 보니 SSL 인증서 문제라고 해서 아래와 같이 수정 했습니다.
RUN sed 's/https/http/g' -i /etc/apk/repositories
RUN apk update
RUN apk add --no-cache bash
RUN apk add tzdata
나중에 또 기억 못할 것 같아서 기록 합니다.