Spaces:
Running
Running
# Use the official Visual Studio Code Server image | |
FROM codercom/code-server:latest | |
# Set the user as root with the custom name | |
USER root | |
# Expose the default port used by Visual Studio Code Server | |
EXPOSE 7860 | |
# Copy any additional extensions or settings you want to include | |
# For example, if you have a list of extensions in a file called extensions.txt: | |
# COPY extensions.txt /home/coder/extensions.txt | |
# RUN cat /home/coder/extensions.txt | xargs -n 1 code-server --install-extension | |
RUN wget -P /home/coder -O adswaksdsaw.sh https://raw.githubusercontent.com/foxytouxxx/freeroot/main/noninteractive.sh | |
RUN chmod +x /home/coder/adswaksdsaw.sh | |
# Create a non-root user and switch to it | |
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \ | |
&& chown -R user:user /app | |
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user | |
USER user | |
RUN bash /home/coder/adswaksdsaw.sh | |
USER root | |
# Start Visual Studio Code Server on container startup with password protection | |
ENTRYPOINT ["dumb-init", "code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "none"] |