mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-02 19:12:09 +08:00
refactor Dockerfile
This commit is contained in:
parent
06dec2e79b
commit
80d411f5b1
10
.dockerignore
Normal file
10
.dockerignore
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
!/module
|
||||
!/plugins
|
||||
!/public
|
||||
!/static
|
||||
!/util
|
||||
!/app.js
|
||||
!/server.js
|
||||
!/package.json
|
||||
!/package-lock.json
|
17
Dockerfile
17
Dockerfile
@ -1,11 +1,16 @@
|
||||
FROM node:lts-alpine
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN apk add --no-cache tini
|
||||
|
||||
RUN npm config set registry "https://registry.npmmirror.com/" \
|
||||
&& npm install -g npm husky \
|
||||
&& npm install --production
|
||||
ENV NODE_ENV production
|
||||
USER node
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --chown=node:node . ./
|
||||
|
||||
RUN npm i --omit=dev --ignore-scripts
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "app.js"]
|
||||
|
||||
CMD [ "/sbin/tini", "--", "node", "app.js" ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user