ci: docker_tag=ext - Migrate to Debian base with minimal packages
All checks were successful
build-and-push-ext / build_push (push) Successful in 6m2s
All checks were successful
build-and-push-ext / build_push (push) Successful in 6m2s
This commit is contained in:
parent
b190edbf72
commit
2355aebf68
21
Dockerfile
21
Dockerfile
@ -29,20 +29,31 @@ RUN git clone -b ext https://git.4nkweb.com/4nk/sdk_client.git
|
||||
WORKDIR /build/sdk_client
|
||||
RUN wasm-pack build --out-dir ../sdk_signer/pkg --target nodejs --dev
|
||||
|
||||
FROM node:20-alpine
|
||||
FROM debian:bookworm-slim
|
||||
WORKDIR /app
|
||||
|
||||
# Installation des dépendances minimales nécessaires
|
||||
RUN apk update && apk upgrade && apk add --no-cache \
|
||||
curl \
|
||||
jq \
|
||||
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get install -y --fix-missing \
|
||||
ca-certificates curl jq git && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Installation de Node.js
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Création d'un utilisateur non-root
|
||||
RUN useradd -m -u 1000 appuser && \
|
||||
mkdir -p /app && chown -R appuser:appuser /app
|
||||
|
||||
# Copie des fichiers du projet
|
||||
COPY --from=wasm-builder /build/sdk_signer/pkg ./pkg
|
||||
COPY . .
|
||||
RUN chown -R appuser:appuser /app
|
||||
|
||||
# Installation des dépendances Node.js
|
||||
USER appuser
|
||||
RUN npm install
|
||||
|
||||
RUN npm run build
|
||||
|
Loading…
x
Reference in New Issue
Block a user