@@ -7,13 +7,17 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
7
7
python3-pip \
8
8
git \
9
9
curl \
10
- fish \
10
+ fish \
11
11
&& apt-get clean \
12
12
&& rm -rf /var/lib/apt/lists/*
13
13
14
14
RUN mkdir -p /home/vscode/.local/share/CMakeTools \
15
15
&& chown -R vscode:vscode /home/vscode/.local/share/CMakeTools
16
16
17
+ RUN mkdir -p /home/vscode/.ssh \
18
+ && chown vscode:vscode /home/vscode/.ssh \
19
+ && chmod 700 /home/vscode/.ssh
20
+
17
21
# Install arduino-cli
18
22
RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
19
23
@@ -26,7 +30,7 @@ ENV PATH="/usr/local/bin:${PATH}"
26
30
# Create workspace directory
27
31
WORKDIR /workspace
28
32
29
- # Copy arduino-cli configuration (customize to your actual path)
33
+ # Copy arduino-cli configuration (customise to your actual path)
30
34
COPY arduino-cli.yaml /root/.arduino15/arduino-cli.yaml
31
35
32
36
# Install build essentials
@@ -64,7 +68,10 @@ RUN mkdir -p /home/vscode/.config/fish && \
64
68
echo 'set -gx PATH /usr/local/bin $PATH' >> /home/vscode/.config/fish/config.fish && \
65
69
echo '# Welcome to the Fish shell inside the dev container!' >> /home/vscode/.config/fish/config.fish
66
70
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