Spaces:
Running
Running
Add Dockerfile
#1
by
radames
- opened
- Dockerfile +25 -0
Dockerfile
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:latest
|
2 |
+
|
3 |
+
RUN useradd -o -u 1000 user
|
4 |
+
|
5 |
+
USER user
|
6 |
+
|
7 |
+
ENV HOME=/home/user \
|
8 |
+
PATH=/home/user/.local/bin:$PATH
|
9 |
+
|
10 |
+
WORKDIR $HOME/app
|
11 |
+
|
12 |
+
COPY --chown=user . $HOME/app
|
13 |
+
|
14 |
+
USER root
|
15 |
+
RUN npm install -g serve
|
16 |
+
RUN wget https://github.com/duckdb/duckdb/releases/download/v0.9.2/duckdb_cli-linux-aarch64.zip && \
|
17 |
+
unzip duckdb_cli-linux-aarch64.zip && chmod +x duckdb && mv duckdb /usr/local/bin
|
18 |
+
|
19 |
+
USER user
|
20 |
+
RUN yarn install && yarn build
|
21 |
+
|
22 |
+
COPY --chown=user ./dist $HOME/app
|
23 |
+
|
24 |
+
EXPOSE 7860
|
25 |
+
CMD [ "serve", "-s", "dist" , "-p", "7860" ]
|