Spaces:
Runtime error
Runtime error
| # Use the official Ubuntu image as the base | |
| FROM ubuntu:20.04 | |
| # Set environment variables | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Update the package list and install necessary packages | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| shellinabox \ | |
| sudo \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create a new user and set a password using chpasswd | |
| RUN useradd -m myuser && \ | |
| echo "myuser:password" | chpasswd && \ | |
| adduser myuser sudo | |
| # Expose the Shell In A Box port | |
| EXPOSE 7860 | |
| # Configure Shell In A Box to listen on port 7060 | |
| RUN sed -i 's/--port=4200/--port=7860/g' /etc/default/shellinabox | |
| # Start Shell In A Box | |
| CMD ["shellinaboxd", "-t", "--no-beep", "--disable-ssl"] |