Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM lobehub/lobe-chat
|
2 |
+
EXPOSE 7860
|
3 |
+
ENV PORT=7860
|
4 |
+
USER root
|
5 |
+
RUN mkdir -p /app/.next/cache
|
6 |
+
RUN chmod -R 777 /app/.next/cache
|
7 |
+
RUN mkdir -p nonexistent
|
8 |
+
RUN chmod -R 777 nonexistent
|
9 |
+
RUN --mount=type=secret,id=ACCESS_CODE,dst=/etc/secrets/ACCESS_CODE \
|
10 |
+
export ACCESS_CODE=$(cat /etc/secrets/ACCESS_CODE)
|
11 |
+
RUN --mount=type=secret,id=OPENAI_API_KEY,dst=/etc/secrets/OPENAI_API_KEY \
|
12 |
+
export OPENAI_API_KEY=$(cat /etc/secrets/OPENAI_API_KEY)
|
13 |
+
RUN --mount=type=secret,id=OPENAI_PROXY_URL,dst=/etc/secrets/OPENAI_PROXY_URL \
|
14 |
+
export OPENAI_PROXY_URL=$(cat /etc/secrets/OPENAI_PROXY_URL)
|
15 |
+
|
16 |
+
USER nextjs
|
17 |
+
CMD ["node", "server.js"]
|