Spaces:
Running
Running
FROM node:latest | |
RUN arch # print arch info | |
RUN useradd -o -u 1000 user | |
USER user | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH \ | |
TMPDIR=$HOME/tmp/ | |
WORKDIR $HOME/app | |
COPY --chown=user . $HOME/app | |
USER root | |
RUN npm install -g serve | |
RUN wget --quiet https://github.com/duckdb/duckdb/releases/download/v0.9.2/duckdb_cli-linux-amd64.zip -O duckdb.zip && \ | |
unzip duckdb.zip && chmod +x duckdb && mv duckdb /usr/local/bin | |
USER user | |
RUN mkdir -p $TMPDIR # note: useless since /tmp already exists | |
RUN yarn && yarn build | |
# COPY --chown=user ./dist $HOME/app | |
EXPOSE 7860 | |
CMD [ "serve", "dist" , "-p", "7860" ] | |