debugService2 / Dockerfile
deepak191z's picture
Update Dockerfile
1a0af48 verified
raw
history blame
748 Bytes
FROM node:18-slim
# Install OpenJDK 17
RUN apt-get update && apt-get install -y \
openjdk-17-jdk \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 node
ENV HOME=/home/node
ENV PATH=/home/node/.local/bin:$PATH
WORKDIR $HOME/app
# Use buildkit secret to clone the repository (requires BuildKit)
RUN --mount=type=secret,id=URL,mode=0444,required=true \
git clone https://$(cat /run/secrets/URL) .
# Install global apk-mitm and project dependencies as root
RUN npm install -g apk-mitm
RUN npm install
# Create uploads directory and set permissions (adjust path if needed)
RUN mkdir -p /app/uploads && chown -R node:node /app
# Switch to node user for running the app
USER node
ENV PORT=7860
EXPOSE 7860
CMD ["npm", "start"]