diff --git a/Dockerfile b/Dockerfile index edb8e0c..5e15cec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ FROM ubuntu -RUN mkdir -p /home/ubuntu/playground -COPY assets/* /home/ubuntu/playground/ - 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' | chpasswd RUN service ssh start +RUN mkdir -p /home/ubuntu/playground +COPY assets/ /home/ubuntu/playground/ + EXPOSE 22 # Start the OpenSSH server diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..16901f7 --- /dev/null +++ b/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +docker compose down +docker compose up --build + diff --git a/ssh.sh b/ssh.sh index ff27301..b7c62bb 100755 --- a/ssh.sh +++ b/ssh.sh @@ -1,3 +1,3 @@ #!/bin/bash ssh-keygen -f "/home/pop-os/.ssh/known_hosts" -R "[localhost]:2222" -ssh -p 2222 test@localhost +ssh -p 2222 -o StrictHostKeyChecking=accept-new test@localhost