urdf-visualizer / Dockerfile
jurmy24's picture
fix: roll back URDF changes and fix only what is needed
41b4066
raw
history blame
729 Bytes
FROM node:18-alpine
# Set up a new user named "user" with user ID 1000
RUN adduser -D user || adduser -D -u 1001 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory
WORKDIR $HOME/app
# Copy package files
COPY --chown=user viewer/package*.json ./
# Install dependencies
RUN npm install
# Copy the entire viewer directory
COPY --chown=user viewer/ .
# Ensure proper file permissions and ownership
RUN chmod -R 755 . && \
chown -R user:user .
# Build the application
RUN npm run build
# Expose port
EXPOSE 7860
# Start the application
CMD ["npm", "run", "preview", "--", "--port", "7860", "--host"]