Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
# Install pnpm and diagnostic tools
|
4 |
RUN npm install -g pnpm
|
5 |
-
RUN apt-get update && apt-get install -y git curl
|
|
|
6 |
|
7 |
# Set environment variables
|
8 |
ENV HOME=/home/user \
|
@@ -26,7 +28,8 @@ RUN touch /app/cookies/cookies.json && \
|
|
26 |
USER user
|
27 |
WORKDIR $HOME/app
|
28 |
|
29 |
-
|
|
|
30 |
|
31 |
COPY --chown=user:user ./cookies.json /app/cookies/cookies.json
|
32 |
|
@@ -37,4 +40,4 @@ RUN pnpm install
|
|
37 |
EXPOSE 7860
|
38 |
|
39 |
# Add proxy and request headers during runtime
|
40 |
-
CMD ["
|
|
|
1 |
+
# Use a specific LTS version of Node.js
|
2 |
+
FROM node:18
|
3 |
|
4 |
# Install pnpm and diagnostic tools
|
5 |
RUN npm install -g pnpm
|
6 |
+
RUN apt-get update && apt-get install -y git curl \
|
7 |
+
&& rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
# Set environment variables
|
10 |
ENV HOME=/home/user \
|
|
|
28 |
USER user
|
29 |
WORKDIR $HOME/app
|
30 |
|
31 |
+
# Add error handling to git clone
|
32 |
+
RUN git clone -b main https://github.com/imputnet/cobalt || { echo "Git clone failed"; exit 1; }
|
33 |
|
34 |
COPY --chown=user:user ./cookies.json /app/cookies/cookies.json
|
35 |
|
|
|
40 |
EXPOSE 7860
|
41 |
|
42 |
# Add proxy and request headers during runtime
|
43 |
+
CMD ["pnpm", "start"]
|