FROM node:latest RUN useradd -o -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR $HOME/app COPY --chown=user . $HOME/app USER root RUN npm install -g serve RUN wget https://github.com/duckdb/duckdb/releases/download/v0.9.2/duckdb_cli-linux-aarch64.zip && \ unzip duckdb_cli-linux-aarch64.zip && chmod +x duckdb && mv duckdb /usr/local/bin USER user RUN yarn install && yarn build COPY --chown=user ./dist $HOME/app EXPOSE 7860 CMD [ "serve", "-s", "dist" , "-p", "7860" ]