diff --git a/Dockerfile b/Dockerfile index 5a97177da..03a16e74c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1: Build TypeScript -FROM node:18 as builder +FROM node:20 as builder WORKDIR /opt/lavamusic/ @@ -15,7 +15,7 @@ COPY . . RUN npm run build # Stage 2: Create production image -FROM node:18-slim +FROM node:20-slim ENV NODE_ENV production @@ -26,11 +26,8 @@ COPY --from=builder /opt/lavamusic/dist ./dist COPY --from=builder /opt/lavamusic/src/utils/LavaLogo.txt ./src/utils/LavaLogo.txt COPY --from=builder /opt/lavamusic/database/lavamusic.db ./database/lavamusic.db -# Copy package files and install dependencies +# Copy package files and install production dependencies COPY package*.json ./ -RUN apt-get update && \ - apt-get install -y && \ - npm install --only=production - +RUN npm install --only=production CMD [ "node", "dist/index.js" ]