diff --git a/PacoMouseCYD/Platformio/.devcontainer/Dockerfile b/PacoMouseCYD/Platformio/.devcontainer/Dockerfile index 5fea3ea..b069b38 100644 --- a/PacoMouseCYD/Platformio/.devcontainer/Dockerfile +++ b/PacoMouseCYD/Platformio/.devcontainer/Dockerfile @@ -17,11 +17,17 @@ RUN apt-get update && apt-get install -y openssh-server && rm -rf /var/lib/apt/l # Set up SSH # RUN mkdir /var/run/sshd -RUN echo 'root:root' | chpasswd -RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +# Create user 'platformio' with password 'platformio' and add to sudo +RUN useradd -m -s /bin/bash platformio \ + && echo 'platformio:platformio' | chpasswd \ + && adduser platformio sudo +# Allow password authentication for SSH and allow user 'platformio' to login +RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \ + && sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config EXPOSE 22 # Set working directory WORKDIR /workspace +# SER platformio CMD ["/usr/sbin/sshd", "-D"] diff --git a/PacoMouseCYD/Platformio/run_pio_docker.sh b/PacoMouseCYD/Platformio/run_pio_docker.sh index cbf3174..ff388b6 100755 --- a/PacoMouseCYD/Platformio/run_pio_docker.sh +++ b/PacoMouseCYD/Platformio/run_pio_docker.sh @@ -11,7 +11,7 @@ shift # exit 1 # fi -IMAGE="easylinux/platformio-dev:1.0" +IMAGE="easylinux/platformio-dev:1.1" CONTAINER="pio-dev" PROJECT_DIR="$(pwd)"