@@ -7,9 +7,13 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
77 python3-pip \
88 git \
99 curl \
10+ fish \
1011 && apt-get clean \
1112 && rm -rf /var/lib/apt/lists/*
1213
14+ RUN mkdir -p /home/vscode/.local/share/CMakeTools \
15+ && chown -R vscode:vscode /home/vscode/.local/share/CMakeTools
16+
1317# Install arduino-cli
1418RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
1519
@@ -22,16 +26,16 @@ ENV PATH="/usr/local/bin:${PATH}"
2226# Create workspace directory
2327WORKDIR /workspace
2428
25- # Copy arduino-cli configuration
29+ # Copy arduino-cli configuration (customize to your actual path)
2630COPY arduino-cli.yaml /root/.arduino15/arduino-cli.yaml
2731
2832# Install build essentials
29- RUN apt-get update && apt-get install -y build-essential
33+ RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
3034
31- # Install Arduino cores for ESP8266 and ESP32
35+ # (Optional) Install Arduino cores for ESP8266 and ESP32 if needed
3236RUN arduino-cli core install esp8266:esp8266 esp32:esp32
3337
34- # Install only required dependencies for DallasTemperature library
38+ # Install only required dependencies for DallasTemperature library and others
3539RUN arduino-cli lib install \
3640 "OneWire" \
3741 "ArduinoUnit" # For testing
@@ -43,13 +47,24 @@ RUN arduino-cli lib list
4347COPY update-libraries.sh /usr/local/bin/
4448RUN chmod +x /usr/local/bin/update-libraries.sh
4549
46- # Add aliases for build operations
50+ # Add aliases for build operations (for Bash)
4751RUN echo 'alias arduino-build="./build.sh build"' >> /home/vscode/.bashrc && \
4852 echo 'alias arduino-test="./build.sh test"' >> /home/vscode/.bashrc && \
4953 echo 'alias arduino-build-test="./build.sh all"' >> /home/vscode/.bashrc
5054
51- # Add welcome message to .bashrc
55+ # Add a welcome message to .bashrc
5256RUN echo '\n # Welcome to the dev container! Here are some useful aliases:' >> /home/vscode/.bashrc && \
5357 echo 'echo " - arduino-build: Build the project"' >> /home/vscode/.bashrc && \
5458 echo 'echo " - arduino-test: Run tests for the project"' >> /home/vscode/.bashrc && \
5559 echo 'echo " - arduino-build-test: Build and test the project"' >> /home/vscode/.bashrc
60+
61+ # (Optional) Add fish-specific configuration if desired
62+ # For example, you might add an alias file or welcome message for fish:
63+ RUN mkdir -p /home/vscode/.config/fish && \
64+ echo 'set -gx PATH /usr/local/bin $PATH' >> /home/vscode/.config/fish/config.fish && \
65+ echo '# Welcome to the Fish shell inside the dev container!' >> /home/vscode/.config/fish/config.fish
66+
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
0 commit comments