improve docker building

This commit is contained in:
SrGooglo 2025-04-01 00:37:12 +00:00
parent 45ff1b8d76
commit 539f1081d4
2 changed files with 31 additions and 11 deletions

View File

@ -1,8 +1,32 @@
./node_modules
./build
./dist
./ssl
# Secrets
/**/**/.env
/**/**/.ssl
# secrets
./api.production.env
./.env
# Trash
/**/**/*.log
/**/**/dumps.log
/**/**/.crash.log
/**/**/.tmp
/**/**/.cache
/**/**/cache
/**/**/out
/**/**/.out
/**/**/dist
/**/**/node_modules
/**/**/corenode_modules
/**/**/.DS_Store
/**/**/.evite
/**/**/uploads
/**/**/d_data
/**/**/redis_data
/**/**/*.env
# Locks
/**/**/package-lock.json
/**/**/yarn.lock
# Logs
/**/**/npm-debug.log*
/**/**/yarn-error.log
/**/**/dumps.log
/**/**/corenode.log

View File

@ -2,12 +2,9 @@ FROM node:20-bookworm-slim
EXPOSE 5000
# Install dependencies
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt update
RUN apt install -y --no-install-recommends build-essential
RUN apt install -y --no-install-recommends curl
RUN apt install -y --no-install-recommends ffmpeg
RUN apt install -y --no-install-recommends yarn
RUN apt install -y --no-install-recommends git
RUN apt install -y --no-install-recommends ssh
RUN apt install -y --no-install-recommends ca-certificates
@ -16,7 +13,6 @@ RUN apt install -y --no-install-recommends ca-certificates
WORKDIR /home/node/app
# Copy Files
COPY package.json ./
COPY . .
# Fix permissions