Skip to content

Commit ac06400

Browse files
authored
fix: Race condition in dockerfile (#3877)
1 parent fb32501 commit ac06400

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docker/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM alpine:3.21 as uploader
33
USER root
44
WORKDIR /tmp
5-
RUN apk -U add gnupg curl
5+
RUN apk -U add gpg gpg-agent curl
66
RUN curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import
77
RUN mkdir uploader && \
88
mkdir uploader/linux && \
@@ -24,8 +24,9 @@ RUN curl -s -o linux/codecov https://uploader.codecov.io/latest/linu
2424
curl -s -o windows/codecov.exe.SHA256SUM https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM && \
2525
curl -s -o windows/codecov.exe.SHA256SUM.sig https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig
2626

27-
# This gpg command is required for the next RUN to work. Something about gpg-agent I'd guess, but this seems to resolve it.
28-
RUN gpg --list-keys
27+
# Not sure why this lock isn't getting cleared, but we need to manually clear
28+
# this lock or the next RUN will hang indefinitely waiting for it.
29+
RUN rm /root/.gnupg/public-keys.d/pubring.db.lock
2930
RUN gpg --verify linux/codecov.SHA256SUM.sig linux/codecov.SHA256SUM && \
3031
gpg --verify alpine/codecov.SHA256SUM.sig alpine/codecov.SHA256SUM && \
3132
gpg --verify macos/codecov.SHA256SUM.sig macos/codecov.SHA256SUM && \

0 commit comments

Comments
 (0)