One-For-All-Server / Dockerfile
hprasath's picture
Update Dockerfile
447b213 verified
raw
history blame
527 Bytes
FROM node:16
# Set working directory
WORKDIR /code
# Copy Node.js application files
COPY ./index.js /code/index.js
COPY ./package.json /code/package.json
COPY ./package-lock.json /code/package-lock.json
# Install Node.js dependencies
RUN npm install
# Install Python and necessary dependencies
RUN apt-get update && \
apt-get install -y python3-pip && \
pip3 install --no-cache-dir uvicorn fastapi
# Expose port
EXPOSE 7860
# Set user to non-root
USER node
# Start Node.js application
CMD ["node", "index.js"]