uni-api / Dockerfile
tatasauce's picture
Update Dockerfile
6721c0b verified
raw
history blame contribute delete
723 Bytes
# Use the uni-api official image
FROM yym68686/uni-api:latest
# Create data directory and set permissions
RUN mkdir -p /data && chown -R 1000:1000 /data
# Set up user and working directory
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
DISABLE_DATABASE=true
# Copy entrypoint script and ensure it has Unix line endings
COPY --chown=user entrypoint.sh /home/user/entrypoint.sh
# Ensure /home directory is writable and fix script permissions
USER root
RUN chmod 777 /home
RUN chmod +x /home/user/entrypoint.sh
RUN sed -i 's/\r$//' /home/user/entrypoint.sh
USER user
# Set working directory
WORKDIR /home/user
# Entry point
ENTRYPOINT ["/home/user/entrypoint.sh"]