mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
optimize dockerfile
This commit is contained in:
parent
015d48fcd9
commit
93d2710f92
@ -2,22 +2,19 @@ FROM node:22-bookworm-slim
|
||||
EXPOSE 9000
|
||||
|
||||
# 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 curl
|
||||
RUN apt install -y --no-install-recommends ca-certificates
|
||||
RUN apt install -y --no-install-recommends ffmpeg
|
||||
|
||||
# Create workdir
|
||||
RUN mkdir -p /comty-server
|
||||
WORKDIR /comty-server
|
||||
|
||||
# Copy Files
|
||||
COPY package.json ./
|
||||
COPY . .
|
||||
|
||||
# Fix permissions
|
||||
@ -28,8 +25,8 @@ RUN chown -R node:node /comty-server
|
||||
USER node
|
||||
|
||||
# Install modules & rebuild for host
|
||||
RUN npm install
|
||||
RUN npm rebuild @tensorflow/tfjs-node --build-from-source
|
||||
RUN npm install --omit=dev
|
||||
#RUN npm rebuild @tensorflow/tfjs-node --build-from-source
|
||||
|
||||
# Start server
|
||||
RUN export NODE_ENV=production
|
||||
|
Loading…
x
Reference in New Issue
Block a user