File size: 723 Bytes
6721c0b 61c3665 6721c0b 61c3665 6721c0b 61c3665 6721c0b 61c3665 6721c0b 61c3665 6721c0b 61c3665 6721c0b 61c3665 6721c0b 61c3665 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# 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"] |