fix: fix the docker entrypoint on Alpine

This commit is contained in:
Amin Yahyaabadi 2025-03-23 11:02:13 -07:00
parent c04f432701
commit 895d69ee98
4 changed files with 12 additions and 10 deletions

View File

@ -6,5 +6,5 @@ RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
# cleanup
rm -rf /var/cache/apk/*
SHELL ["/bin/bash", "-l", "-c"]
ENTRYPOINT ["/bin/bash", "-l"]
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]

View File

@ -6,5 +6,5 @@ RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
# cleanup
rm -rf /var/cache/apk/*
SHELL ["/bin/bash", "-l", "-c"]
ENTRYPOINT ["/bin/bash", "-l"]
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]

View File

@ -1,7 +1,5 @@
FROM aminya/setup-cpp-alpine:latest AS setup-cpp-alpine-mingw
COPY "./dist/modern" "/usr/lib/setup-cpp/"
# install mingw/powershell
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler mingw \
@ -9,5 +7,5 @@ RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
# cleanup
rm -rf /var/cache/apk/*
SHELL ["/bin/bash", "-l", "-c"]
ENTRYPOINT ["/bin/bash", "-l"]
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]

View File

@ -26,5 +26,9 @@ RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
# cleanup
rm -rf /var/cache/apk/*
SHELL ["/bin/bash", "-l", "-c"]
ENTRYPOINT ["/bin/bash", "-l"]
# Custom entrypoint due to bash -l limitations on Alpine
RUN printf '#!/bin/bash\nsource $HOME/.cpprc\nexec "$@"\n' > /entrypoint.sh && \
chmod +x /entrypoint.sh
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]