Update Dockerfile
Browse files16 unmodified lines1718192020212223242526272829302324252627282930313234333435363616 unmodified lines
# CMD ["docker-compose up"]
# Use a base image with an SSH server (you can choose a specific image based on your requirements)FROM ubuntu:latest
RUN apt update && apt install openssh-server sudo -y
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 test
RUN echo 'test:test' | chpasswdRUN ssh-keygen -A
RUN service ssh start# Update the package lists and install the SSH serverRUN apt-get update && apt-get install -y openssh-server
# Create an SSH user (replace "sshuser" with your desired username)RUN useradd -m -d /home/sshuser -s /bin/bash sshuser
# Set a password for the SSH user (replace "sshpassword" with your desired password)RUN echo 'sshuser:sshpassword' | chpasswd
# Expose port 7768 for SSHEXPOSE 22EXPOSE 7768
# Start the SSH server when the container runsCMD ["/usr/sbin/sshd","-D"]CMD ["/usr/sbin/sshd", "-D"]Dockerfile+11-11