File size: 730 Bytes
d6a4110 ddd5ca0 d6a4110 ddd5ca0 92c234d d6a4110 9d7e54c d6a4110 64b15d7 93a7599 d6a4110 23d540c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
FROM node:20-alpine
WORKDIR /app
# Install unzip utility
RUN apk add --no-cache unzip
# Copy and unzip the bot zip file to /app directly (flatten contents)
COPY emperor-bot.zip ./
RUN unzip -q emperor-bot.zip -d temp \
&& cp -r temp/*/* . \
&& rm -rf temp emperor-bot.zip
Run ls
# Copy package.json and package-lock.json
COPY package*.json ./
# Install TypeScript globally
RUN npm install -g typescript
# Install dependencies
RUN npm install
# Copy remaining source code
COPY . .
# Build TypeScript
#RUN npm run build
#Install dev dependencies required to run TypeScript directly
RUN npm install --save-dev ts-node nodemon @types/node typescript
# Expose port
EXPOSE 7860
# Start the bot
CMD ["npm", "run", "dev"]
|