File tree Expand file tree Collapse file tree 15 files changed +106
-49
lines changed
Expand file tree Collapse file tree 15 files changed +106
-49
lines changed Original file line number Diff line number Diff line change 1- base-all
1+ base-all /data /arduino
2+ base-all /data /arduino-downloads
23Arduino
34node_modules
45.env
Original file line number Diff line number Diff line change 1- FROM duinoapp/arduino-cli-base:latest
1+ FROM node:10-buster
2+
3+ USER root
4+ RUN useradd duino
5+
6+ COPY setup/index.js /home/duino/setup/index.js
7+ COPY setup/arduino-cli.yml /home/duino/data/arduino-cli.yml
8+ # COPY Arduino /home/duino/Arduino
9+
10+ # RUN mkdir /home/duino
11+ RUN chown duino:duino /home/duino -R
12+ RUN apt-get update && apt-get install build-essential -y
13+
14+ WORKDIR /home/duino
15+ USER duino
16+
17+ RUN wget https://github.com/arduino/arduino-cli/releases/download/0.13.0/arduino-cli_0.13.0_Linux_64bit.tar.gz -O - | tar -xz
18+
19+ RUN ls
20+
21+
22+ ENV CLI_ARGS="--config-file /home/duino/data/arduino-cli.yml --format json"
23+ RUN ./arduino-cli core update-index ${CLI_ARGS}
24+ RUN ./arduino-cli core search "" ${CLI_ARGS} > /home/duino/data/cores.json
25+
26+ RUN ./arduino-cli lib update-index ${CLI_ARGS}
27+ RUN ./arduino-cli lib search "" ${CLI_ARGS} > /home/duino/data/libs.json
28+
29+ RUN node setup/ cores
30+ RUN node setup/ boards
231
332USER root
433COPY package*.json /home/duino/
534RUN chown duino:duino /home/duino/package*.json
35+ RUN apt-get install nano
636USER duino
737
838RUN npm ci
939
1040USER root
1141COPY src /home/duino/src
1242RUN chown duino:duino /home/duino/src -R
43+ RUN mkdir /data
44+ RUN chmod 0777 /data
45+ COPY entrypoint.sh /home/duino/
46+ COPY load-libs.sh /home/duino/
47+ RUN chmod +x ./*.sh
48+ RUN chown duino:duino ./*.sh
1349USER duino
1450
1551EXPOSE 3030
16- CMD [ "node" , "src/index.js " ]
52+ CMD [ "./entrypoint.sh " ]
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,11 +25,15 @@ services:
2525 image : duinoapp/duinoapp-server:latest
2626 container_name : duinoapp
2727 restart : unless-stopped
28+ volumes :
29+ - duinoapp-lib-downloads:/data
2830 environment : # update these, server info displayed to users
2931 - SERVER_INFO_NAME=Example Server
3032 - SERVER_INFO_LOCATION=Australia/Sydney
3133 # must be a two letter country code
3234 - SERVER_INFO_COUNTRY=AU
3335 - SERVER_INFO_OWNER=Jane Smith
3436 - SERVER_INFO_WEBSITE=site.example.com
35- - SERVER_INFO_DESCRIPTION=Just Another Example Server
37+ - SERVER_INFO_DESCRIPTION=Just Another Example Server
38+ volumes :
39+ duinoapp-lib-downloads:
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ ./load-libs.sh
3+
4+ node src/index.js
Original file line number Diff line number Diff line change 1+ file=" /data/arduino.tar.gz"
2+ uri=" http://duino-dump.s3-website.us-east-2.amazonaws.com/arduino.tar.gz"
3+
4+ curl -o " $file " -z " $file " " $uri "
5+ rm -rf /home/duino/Arduino
6+ tar -xzf $file
Original file line number Diff line number Diff line change 11board_manager :
22 additional_urls :
33 - http://arduino.esp8266.com/stable/package_esp8266com_index.json
4+ - https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
45arduino_data : ' /home/duino/data/arduino/'
56downloads_dir : ' /home/duino/data/arduino-downloads/'
You can’t perform that action at this time.
0 commit comments