diff --git a/api/Dockerfile b/api/Dockerfile index 682286786..cc8f36ece 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -15,7 +15,7 @@ RUN apt update && apt install -y curl && \ curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && \ apt install -y nodejs && \ apt remove --purge -y curl && \ - rm -rf /var/lib/apt/lists/* \ + rm -rf /var/lib/apt/lists/* WORKDIR /work_tmp COPY requirements.txt /work_tmp/requirements.txt diff --git a/ee/api/Dockerfile b/ee/api/Dockerfile index aee6aecb2..c99e576e4 100644 --- a/ee/api/Dockerfile +++ b/ee/api/Dockerfile @@ -1,21 +1,8 @@ FROM python:3.9.10-slim LABEL Maintainer="Rajesh Rajendran" LABEL Maintainer="KRAIEM Taha Yassine" -RUN apt-get update && apt-get install -y pkg-config libxmlsec1-dev gcc && rm -rf /var/lib/apt/lists/* -WORKDIR /work -COPY . . -RUN pip install -r requirements.txt -RUN mv .env.default .env ENV APP_NAME chalice -# Installing Nodejs -RUN apt update && apt install -y curl && \ - curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && \ - apt install -y nodejs && \ - apt remove --purge -y curl && \ - rm -rf /var/lib/apt/lists/* && \ - cd sourcemap-reader && \ - npm install - +RUN apt-get update && apt-get install -y pkg-config libxmlsec1-dev gcc && rm -rf /var/lib/apt/lists/* # Add Tini # Startup daemon ENV TINI_VERSION v0.19.0 @@ -23,5 +10,23 @@ ARG envarg ENV ENTERPRISE_BUILD ${envarg} ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini RUN chmod +x /tini + +# Installing Nodejs +RUN apt update && apt install -y curl && \ + curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && \ + apt install -y nodejs && \ + apt remove --purge -y curl && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /work_tmp +COPY requirements.txt /work_tmp/requirements.txt +RUN pip install -r /work_tmp/requirements.txt +COPY sourcemap-reader/*.json /work_tmp/ +RUN cd /work_tmp && npm install + +WORKDIR /work +COPY . . +RUN mv .env.default .env && mv /work_tmp/node_modules sourcemap-reader/. + ENTRYPOINT ["/tini", "--"] CMD ./entrypoint.sh