MuseV / Dockerfile
jmanhype
fix: update Dockerfile to use non-root user for git config
99e8bea
raw
history blame
1.15 kB
FROM ubuntu:22.04
# Install essential packages first
RUN apt-get update && apt-get install -y \
wget \
git \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user
RUN useradd -m -s /bin/bash huggingface
# Switch to the non-root user
USER huggingface
WORKDIR /home/huggingface
# Configure git for the user
RUN git config --global user.email "[email protected]" && \
git config --global user.name "jmanhype"
# This is a test Dockerfile to see if it's actually being used
RUN echo "TESTING IF THIS DOCKERFILE IS ACTUALLY USED" > /home/huggingface/test_file.txt && \
echo "If you see this message, the correct Dockerfile is being used!"
# Create a very obvious test directory
RUN mkdir -p /home/huggingface/THIS_IS_A_TEST_DIRECTORY && \
echo "TEST CONTENT" > /home/huggingface/THIS_IS_A_TEST_DIRECTORY/test.txt
# Print test message during build
RUN echo "=================================================" && \
echo "THIS IS A TEST BUILD - IF YOU SEE THIS, THE DOCKERFILE IS BEING USED" && \
echo "================================================="
CMD ["cat", "/home/huggingface/test_file.txt"]