File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 35
35
" --network" , " host" ,
36
36
" -v" , " /tmp/.X11-unix:/tmp/.X11-unix" ,
37
37
" -e" , " DISPLAY=unix${localEnv:DISPLAY}" ,
38
- " --device" , " /dev/ttyACM0 "
38
+ " --device-cgroup-rule " , " c *:* rmw "
39
39
],
40
40
41
41
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ RUN apt-get install -y build-essential
33
33
ARG USER_UID
34
34
ARG USER_GID
35
35
36
- RUN groupadd --gid $USER_GID arduino && useradd --uid $USER_UID --gid $USER_GID --groups dialout --create-home arduino
36
+ RUN groupadd --gid $USER_GID arduino && useradd --uid $USER_UID --gid $USER_GID --groups dialout,sudo --create-home arduino
37
+ RUN echo "arduino:Mb921" | chpasswd
37
38
38
39
RUN wget -O /home/arduino/arduino-ide.AppImage https://downloads.arduino.cc/arduino-ide/arduino-ide_2.0.0-rc9.2_Linux_64bit.AppImage
39
40
RUN chmod +x /home/arduino/arduino-ide.AppImage
@@ -42,7 +43,9 @@ COPY ./arduino-ide-initial-settings.json /home/arduino/.arduinoIDE/settings.json
42
43
RUN chown -R arduino:arduino /home/arduino/.arduinoIDE
43
44
44
45
# https://github.com/Rahix/avr-hal
45
- RUN apt-get install -y avr-libc gcc-avr pkg-config avrdude libudev-dev
46
+ RUN apt-get update && apt-get install -y avr-libc gcc-avr pkg-config avrdude libudev-dev
47
+
48
+ RUN apt-get install -y sudo
46
49
47
50
USER arduino
48
51
WORKDIR /home/arduino
Original file line number Diff line number Diff line change
1
+ ## Notes
2
+
3
+ - Arduino devices are usually mapped to ` /dev/ttyACM0 `
4
+
5
+ ## Commands
6
+
7
+ - Add Arduino device after container has started
8
+ - ` sudo mknod /dev/ttyACM0 c 0 166 `
You can’t perform that action at this time.
0 commit comments