Spaces:
Build error
Build error
Commit
·
98eaa7b
1
Parent(s):
4bd6e4f
Update Dockerfile
Browse files- Dockerfile +18 -10
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
FROM node:
|
2 |
|
3 |
# Default working dir
|
4 |
WORKDIR /opt/node_app
|
@@ -8,33 +8,41 @@ WORKDIR /opt/node_app
|
|
8 |
RUN apt update
|
9 |
#RUN apt install git yarn -y
|
10 |
#RUN npm install --global yarn
|
11 |
-
|
12 |
|
13 |
#RUN npm install react react-dom @excalidraw/excalidraw vscode-languageclient -g
|
14 |
|
15 |
# Create a React
|
16 |
-
RUN npx create-react-app my-excalidraw-app
|
17 |
-
|
18 |
|
19 |
# Change to the newly created directory
|
20 |
-
WORKDIR /opt/node_app/my-excalidraw-app
|
21 |
-
|
22 |
|
23 |
# Set ENV on dev / prod
|
24 |
-
RUN echo -e "\n\nBROWSER=NONE" >> .env.development
|
25 |
-
RUN echo -e "\n\nBROWSER=NONE" >> .env.development
|
26 |
|
27 |
|
28 |
|
29 |
# Setup npm / yarn / deps
|
30 |
#RUN npm install react react-dom
|
31 |
#RUN npm install workbox-build workbox-window eslint
|
32 |
-
RUN yarn add react react-dom @excalidraw/excalidraw workbox-build workbox-window eslint
|
33 |
|
34 |
# Run yarn to install deps
|
35 |
-
RUN yarn
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
39 |
# Replace the content of src/App.js
|
40 |
#RUN echo "import React from 'react';" > src/App.js \
|
|
|
1 |
+
FROM node:18
|
2 |
|
3 |
# Default working dir
|
4 |
WORKDIR /opt/node_app
|
|
|
8 |
RUN apt update
|
9 |
#RUN apt install git yarn -y
|
10 |
#RUN npm install --global yarn
|
11 |
+
RUN pip install uvicorn
|
12 |
|
13 |
#RUN npm install react react-dom @excalidraw/excalidraw vscode-languageclient -g
|
14 |
|
15 |
# Create a React
|
16 |
+
#RUN npx create-react-app my-excalidraw-app
|
17 |
+
RUN git clone https://github.com/excalidraw/excalidraw
|
18 |
|
19 |
# Change to the newly created directory
|
20 |
+
#WORKDIR /opt/node_app/my-excalidraw-app
|
21 |
+
WORKDIR /opt/node_app/excalidraw
|
22 |
|
23 |
# Set ENV on dev / prod
|
24 |
+
#RUN echo -e "\n\nBROWSER=NONE" >> .env.development
|
25 |
+
#RUN echo -e "\n\nBROWSER=NONE" >> .env.development
|
26 |
|
27 |
|
28 |
|
29 |
# Setup npm / yarn / deps
|
30 |
#RUN npm install react react-dom
|
31 |
#RUN npm install workbox-build workbox-window eslint
|
32 |
+
#RUN yarn add react react-dom @excalidraw/excalidraw workbox-build workbox-window eslint
|
33 |
|
34 |
# Run yarn to install deps
|
35 |
+
#RUN yarn
|
36 |
+
|
37 |
+
RUN yarn --ignore-optional --network-timeout 600000
|
38 |
+
|
39 |
+
# Set prod build
|
40 |
+
|
41 |
+
ARG NODE_ENV=production
|
42 |
|
43 |
+
# Build prod
|
44 |
|
45 |
+
RUN yarn build:app:docker
|
46 |
|
47 |
# Replace the content of src/App.js
|
48 |
#RUN echo "import React from 'react';" > src/App.js \
|