fix(core): update
This commit is contained in:
parent
6ecde05045
commit
53bf486899
@ -1,5 +1,7 @@
|
|||||||
FROM docker:dind
|
# Stage 1: Build Stage
|
||||||
|
FROM docker:dind as build-stage
|
||||||
|
|
||||||
|
# Install necessary build tools and dependencies
|
||||||
RUN apk update && apk add --no-cache \
|
RUN apk update && apk add --no-cache \
|
||||||
git \
|
git \
|
||||||
openssl \
|
openssl \
|
||||||
@ -21,30 +23,28 @@ RUN apk update && apk add --no-cache \
|
|||||||
nodejs-current \
|
nodejs-current \
|
||||||
npm \
|
npm \
|
||||||
krb5-libs \
|
krb5-libs \
|
||||||
&& update-ca-certificates \
|
|
||||||
rust \
|
rust \
|
||||||
docker-cli \
|
docker-cli \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
docker-compose
|
docker-compose \
|
||||||
|
libc6-compat \
|
||||||
|
alpine-sdk \
|
||||||
|
&& update-ca-certificates
|
||||||
|
|
||||||
RUN apk update && apk add bash libc6-compat alpine-sdk
|
# Ensure Python is correctly installed and upgrade pip
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
|
RUN ln -sf python3 /usr/bin/python && \
|
||||||
RUN python3 -m ensurepip
|
apk add --no-cache py3-pip py3-setuptools
|
||||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
|
||||||
|
|
||||||
# Add the patch fix
|
# Add the patch fix
|
||||||
COPY ./stack-fix.c /lib/
|
COPY ./stack-fix.c /lib/
|
||||||
|
|
||||||
RUN node -v && npm -v
|
# Install pnpm
|
||||||
|
ENV PNPM_HOME="/root/.local/share/pnpm"
|
||||||
#pnpm
|
|
||||||
ENV PNPM_HOME="/root/.local/share/pnpm/pnpm"
|
|
||||||
RUN mkdir -p ${PNPM_HOME}
|
RUN mkdir -p ${PNPM_HOME}
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN curl -fsSL "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
|
RUN curl -fsSL "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" -o /bin/pnpm && chmod +x /bin/pnpm
|
||||||
RUN pnpm -v
|
|
||||||
|
|
||||||
# Prepare the libraries packages
|
# Prepare the libraries packages
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
@ -52,7 +52,62 @@ RUN set -ex \
|
|||||||
&& gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so \
|
&& gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so \
|
||||||
&& apk del .build-deps
|
&& apk del .build-deps
|
||||||
|
|
||||||
# export the environment variable of LD_PRELOAD
|
# Export the environment variable of LD_PRELOAD
|
||||||
ENV LD_PRELOAD /lib/stack-fix.so
|
ENV LD_PRELOAD /lib/stack-fix.so
|
||||||
|
|
||||||
|
# Validate installations
|
||||||
|
RUN node -v && npm -v && pnpm -v
|
||||||
|
RUN pnpm config set unsafe-perm true
|
||||||
|
|
||||||
|
# Stage 2: Final Stage
|
||||||
|
FROM docker:dind
|
||||||
|
|
||||||
|
# Copy necessary files from build-stage
|
||||||
|
COPY --from=build-stage /usr/bin/python3 /usr/bin/python3
|
||||||
|
COPY --from=build-stage /usr/lib/python3.*/ /usr/lib/python3.*/
|
||||||
|
COPY --from=build-stage /usr/bin/pip3 /usr/bin/pip3
|
||||||
|
COPY --from=build-stage /lib/stack-fix.so /lib/stack-fix.so
|
||||||
|
COPY --from=build-stage /bin/pnpm /bin/pnpm
|
||||||
|
COPY --from=build-stage ${PNPM_HOME} ${PNPM_HOME}
|
||||||
|
|
||||||
|
# Ensure CA certificates are up-to-date
|
||||||
|
RUN apk update && apk add --no-cache \
|
||||||
|
git \
|
||||||
|
openssl \
|
||||||
|
openssl-dev \
|
||||||
|
ca-certificates \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
make \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
py3-pip \
|
||||||
|
linux-headers \
|
||||||
|
paxctl \
|
||||||
|
libgcc \
|
||||||
|
libstdc++ \
|
||||||
|
gnupg \
|
||||||
|
nodejs-current \
|
||||||
|
npm \
|
||||||
|
krb5-libs \
|
||||||
|
rust \
|
||||||
|
docker-cli \
|
||||||
|
libffi-dev \
|
||||||
|
libc-dev \
|
||||||
|
docker-compose \
|
||||||
|
libc6-compat \
|
||||||
|
alpine-sdk \
|
||||||
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
# Re-set environment variables for final stage
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
ENV PNPM_HOME="/root/.local/share/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
ENV LD_PRELOAD /lib/stack-fix.so
|
||||||
|
|
||||||
|
# Validate installations in final stage
|
||||||
|
RUN node -v && npm -v && pnpm -v
|
||||||
|
|
||||||
RUN pnpm config set unsafe-perm true
|
RUN pnpm config set unsafe-perm true
|
||||||
|
Loading…
Reference in New Issue
Block a user