Spaces:
Paused

test / Dockerfile
geanzinho's picture
Update Dockerfile
d60126a verified
Raw History Blame Contribute Delete
916 Bytes
# Use Ubuntu as the base image
FROM ubuntu:20.04
# Set environment variables for non-interactive installation
ENV DEBIAN_FRONTEND=noninteractive
# Update package list and install sudo, git, and other basic utilities
RUN apt-get update && \
apt-get install -y sudo curl wget vim nano git software-properties-common && \
apt-get clean
# Create a user with sudo privileges
RUN useradd -m -s /bin/bash user && \
echo "user:user" | chpasswd && \
usermod -aG sudo user
# Allow the user to run sudo without a password
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
# Set the user to 'user' to run commands (but still have sudo privileges)
USER user
# Set the working directory
WORKDIR /home/user
# Set up Git configuration
RUN git config --global user.email "geanzinho@users.noreply.huggingface.co" && \
git config --global user.name "Gean"
# Start bash shell
CMD ["/bin/bash"]