Skip to content

Commit a9b5eb8

Browse files
committed
Add a wrapper script to authenticate curl requests to GitHub API
1 parent 0e32f6e commit a9b5eb8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apk/Dockerfile-alpine

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ RUN apk update && \
2020
apk add --update -U python3 python3-dev py3-pip libffi-dev gcc linux-headers musl-dev openssl-dev
2121

2222
RUN echo "auth sufficient pam_shells.so" > /etc/pam.d/chsh
23+
24+
# Add a wrapper script to authenticate curl requests when directed to GitHub API
25+
COPY bin/curl-auth /usr/local/bin/curl-auth
26+
RUN real_curl="$(which curl)" && \
27+
mv "${real_curl}" "${real_curl}".real && \
28+
mv /usr/local/bin/curl-auth "${real_curl}" && \
29+
chmod +x "${real_curl}"

0 commit comments

Comments
 (0)