ihm_client/Dockerfile
4NK CI Bot 34d57c95f7
Some checks failed
Build and Push Docker image (ext) / docker (push) Failing after 59s
ci: docker_tag=ext - Migrate to Debian base with minimal packages
2025-09-21 18:25:14 +00:00

43 lines
1.1 KiB
Docker
Executable File

# syntax=docker/dockerfile:1.4
FROM debian:bookworm-slim
WORKDIR /app
# Installation des dépendances minimales nécessaires
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
# Copy project files
COPY . .
RUN chown -R appuser:appuser /app
# Ensure pkg directory exists and has correct permissions
RUN mkdir -p pkg && chmod -R 755 pkg
# Verify pkg files are present
RUN ls -la pkg/ && file pkg/sdk_client_bg.wasm
# Copy the provided prebuilt WASM package (ESM)
# The directory pkg is provided in the build context
# and already contains sdk_client.js (ES module) and wasm
# so no compilation is required here.
# Installation des dépendances Node.js
USER appuser
RUN npm install
EXPOSE 3003
CMD ["npm", "start"]