FROM node:latest 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 && \ unzip duckdb_cli-linux-amd64.zip && chmod +x duckdb && mv duckdb /usr/local/bin USER user RUN mkdir -p $TMPDIR # useless since /tmp already exists, but haha how could I know RUN yarn && yarn build # COPY --chown=user ./dist $HOME/app EXPOSE 7860 CMD [ "serve", "-s", "dist" , "-p", "7860" ]