FROM node:18 as build WORKDIR /build/app COPY package.json tsconfig.json /build/app/ COPY src /build/app/src/ RUN npm install --frozen-lockfile RUN yarn build FROM node:18 as run WORKDIR /app COPY --from=build /build/app/ /app/ # Set up python RUN apt-get update RUN apt-get install -y pip # Clone sherlock RUN git clone https://github.com/sherlock-project/sherlock.git /app/sherlock WORKDIR /app/sherlock # piss off python RUN rm /usr/lib/python*/EXTERNALLY-MANAGED RUN python3 -m pip install -r requirements.txt ENV SHERLOCK_COMMAND "python3 /app/sherlock/sherlock" WORKDIR /app CMD ["node", "--experimental-specifier-resolution=node", "dist"]