Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +3 -5
Dockerfile
CHANGED
|
@@ -1,8 +1,7 @@
|
|
| 1 |
-
|
| 2 |
-
FROM node:lts-buster
|
| 3 |
|
| 4 |
USER root
|
| 5 |
-
# Create app directory and set permissions
|
| 6 |
RUN mkdir -p /app && chown -R node:node /app
|
| 7 |
|
| 8 |
# Install necessary dependencies
|
|
@@ -23,7 +22,6 @@ RUN --mount=type=secret,id=GITHUB_REPO,required=true \
|
|
| 23 |
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/$(cat /run/secrets/GITHUB_REPO).git .
|
| 24 |
|
| 25 |
# Switch to the node user
|
| 26 |
-
|
| 27 |
COPY --chown=node:node . .
|
| 28 |
|
| 29 |
RUN mkdir -p /app/lib/database && chown -R node:node /app/lib
|
|
@@ -31,7 +29,7 @@ RUN mkdir -p /app/lib/database && chown -R node:node /app/lib
|
|
| 31 |
# Set permissions for the /app directory to allow writing
|
| 32 |
RUN chmod -R 777 /app
|
| 33 |
|
| 34 |
-
# Install
|
| 35 |
RUN npm install node-cache
|
| 36 |
|
| 37 |
RUN npm install || yarn install
|
|
|
|
| 1 |
+
FROM node:lts
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
+
# Create app directory and set permissions
|
| 5 |
RUN mkdir -p /app && chown -R node:node /app
|
| 6 |
|
| 7 |
# Install necessary dependencies
|
|
|
|
| 22 |
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/$(cat /run/secrets/GITHUB_REPO).git .
|
| 23 |
|
| 24 |
# Switch to the node user
|
|
|
|
| 25 |
COPY --chown=node:node . .
|
| 26 |
|
| 27 |
RUN mkdir -p /app/lib/database && chown -R node:node /app/lib
|
|
|
|
| 29 |
# Set permissions for the /app directory to allow writing
|
| 30 |
RUN chmod -R 777 /app
|
| 31 |
|
| 32 |
+
# Install dependencies
|
| 33 |
RUN npm install node-cache
|
| 34 |
|
| 35 |
RUN npm install || yarn install
|