spooky-bot / Dockerfile
Mahfujul's picture
Update Dockerfile
a94ca4d verified
raw
history blame
No virus
1.09 kB
FROM ghcr.io/puppeteer/puppeteer:latest
# Set environment variables
ENV TOKEN=MTAyOTExOTAzMzEwODM0NDg0Mw.GHRuSg.UJGFPx7vbUBU23sHWzUPastwQXwsi1aWZnKjho \
MSGCHANNEL=1226099247963832351 \
ACCESS_TOKEN=2f763b38ad6c26368f5b6d3c86b2089bb98acfd4 \
CHARACTER_ID=PH7dDFG7FXHnEIcTw8maMJypt142z7HLYqt6Vdz88YE
# Set the working directory
WORKDIR /code
# Create a temporary directory
RUN mkdir /tmp/code
# Copy package.json and package-lock.json to the temporary directory
COPY package*.json /tmp/code/
# Change ownership of the files to allow npm install
RUN chown -R node:node /tmp/code
# Switch to the node user
USER node
# Install dependencies in the temporary directory
RUN npm install --prefix /tmp/code
# Switch back to the root user
USER root
# Copy the rest of the application code to the working directory
COPY . .
# Copy dependencies from the temporary directory to the working directory
RUN cp -a /tmp/code/node_modules /code/
# Expose any necessary ports
EXPOSE 7860
# Command to run the application
CMD ["npm", "start", "--host", "0.0.0.0", "--port", "7860"]