@@ -7,13 +7,17 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
77 python3-pip \
88 git \
99 curl \
10- fish \
10+ fish \
1111 && apt-get clean \
1212 && rm -rf /var/lib/apt/lists/*
1313
1414RUN mkdir -p /home/vscode/.local/share/CMakeTools \
1515&& chown -R vscode:vscode /home/vscode/.local/share/CMakeTools
1616
17+ RUN mkdir -p /home/vscode/.ssh \
18+ && chown vscode:vscode /home/vscode/.ssh \
19+ && chmod 700 /home/vscode/.ssh
20+
1721# Install arduino-cli
1822RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
1923
@@ -26,7 +30,7 @@ ENV PATH="/usr/local/bin:${PATH}"
2630# Create workspace directory
2731WORKDIR /workspace
2832
29- # Copy arduino-cli configuration (customize to your actual path)
33+ # Copy arduino-cli configuration (customise to your actual path)
3034COPY arduino-cli.yaml /root/.arduino15/arduino-cli.yaml
3135
3236# Install build essentials
@@ -64,7 +68,10 @@ RUN mkdir -p /home/vscode/.config/fish && \
6468 echo 'set -gx PATH /usr/local/bin $PATH' >> /home/vscode/.config/fish/config.fish && \
6569 echo '# Welcome to the Fish shell inside the dev container!' >> /home/vscode/.config/fish/config.fish
6670
67- # If you want to default to fish shell (uncomment below),
68- # you can either set the SHELL environment variable or change the user default shell:
69- # RUN chsh -s /usr/bin/fish vscode
70- # ENV SHELL=/usr/bin/fish
71+ # Generate SSH keys and set proper ownership and permissions
72+ RUN if [ ! -f /home/vscode/.ssh/id_rsa ]; then \
73+ ssh-keygen -t rsa -b 4096 -N "" -C "devcontainer@local" -f /home/vscode/.ssh/id_rsa && \
74+ chmod 600 /home/vscode/.ssh/id_rsa && \
75+ chmod 644 /home/vscode/.ssh/id_rsa.pub && \
76+ chown vscode:vscode /home/vscode/.ssh/id_rsa /home/vscode/.ssh/id_rsa.pub ; \
77+ fi
0 commit comments