-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
120 lines (103 loc) · 4.68 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
FROM node:22-alpine AS base
ENV ARDUINO_CLI_VERSION=1.1.0
ENV SENSEBOXCORE_VERSION=2.0.0
ENV ARDUINO_SAMD_VERSION=1.8.13
ENV ARDUINO_AVR_VERSION=1.8.5
ENV ESP32_VERSION=2.0.17
ENV SENSEBOXCORE_URL=https://raw.githubusercontent.com/mariopesch/senseBoxMCU-core/master/package_sensebox_index.json
ENV ESP32CORE_URL=https://espressif.github.io/arduino-esp32/package_esp32_index.json
RUN apk update
RUN apk add curl
RUN apk add libc6-compat
RUN apk add bash
RUN apk add python3
RUN apk add py3-pyserial
RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s ${ARDUINO_CLI_VERSION}
RUN arduino-cli config init
# allow unsafe sources (zip, git)
RUN arduino-cli config set library.enable_unsafe_install true
# update arduino-cli
RUN arduino-cli core update-index
RUN arduino-cli core install arduino:avr
RUN arduino-cli core install arduino:samd@${ARDUINO_SAMD_VERSION}
# install arduino stuff for senseBox V2
RUN curl -o /root/.arduino15/package_sensebox_index.json ${SENSEBOXCORE_URL}
RUN arduino-cli --additional-urls ${SENSEBOXCORE_URL} core install sensebox:samd
# install ESP32
RUN curl -o /root/.arduino15/package_esp32_index.json ${ESP32CORE_URL}
RUN arduino-cli --additional-urls ${ESP32CORE_URL} core install esp32:esp32@${ESP32_VERSION}
# install Libraries with arduino-cli
RUN arduino-cli lib install "Ethernet"
RUN arduino-cli lib install "ArduinoJson"
RUN arduino-cli lib install "Adafruit HDC1000 Library"
RUN arduino-cli lib install "Adafruit BME280 Library"
RUN arduino-cli lib install "Adafruit BMP280 Library"
RUN arduino-cli lib install "Adafruit BME680 Library"
RUN arduino-cli lib install "Adafruit DPS310"
RUN arduino-cli lib install "Adafruit NeoPixel"
RUN arduino-cli lib install "Adafruit SSD1306"
RUN arduino-cli lib install "Adafruit GFX Library"
RUN arduino-cli lib install "Adafruit MQTT Library"
RUN arduino-cli lib install "Adafruit BusIO"
RUN arduino-cli lib install "Adafruit SleepyDog Library"
RUN arduino-cli lib install "Adafruit MPU6050"
RUN arduino-cli lib install "DallasTemperature"
RUN arduino-cli lib install "ArduinoBearSSL"
RUN arduino-cli lib install "ArduinoECCX08"
RUN arduino-cli lib install "SparkFun SCD30 Arduino Library"
RUN arduino-cli lib install "SparkFun u-blox GNSS Arduino Library"
RUN arduino-cli lib install "NewPing"
RUN arduino-cli lib install "IBM LMIC framework"
RUN arduino-cli lib install "LoRa Serialization"
RUN arduino-cli lib install "CayenneLPP"
RUN arduino-cli lib install "OneWire"
RUN arduino-cli lib install "Nova Fitness Sds dust sensors library"
RUN arduino-cli lib install "JC_Button"
RUN arduino-cli lib install "SD"
RUN arduino-cli lib install "BSEC Software Library"
RUN arduino-cli lib install "TheThingsNetwork"
RUN arduino-cli lib install "NTPClient"
RUN arduino-cli lib install "phyphox BLE"
RUN arduino-cli lib install "UniversalTelegramBot"
RUN arduino-cli lib install "Servo"
RUN arduino-cli lib install "RTCZero"
RUN arduino-cli lib install "sensirion-sps"
RUN arduino-cli lib install "TinyGPSPlus"
RUN arduino-cli lib install "SenseBoxBLE"
RUN arduino-cli lib install "Bolder Flight Systems Unit Conversions"
RUN arduino-cli lib install "HX711"
RUN arduino-cli lib install "STM32duino VL53L8CX"
RUN arduino-cli lib install "Adafruit ICM20X"
RUN arduino-cli lib install "NeoGPS"
RUN arduino-cli lib install "Adafruit NeoMatrix"
RUN arduino-cli lib install "Arduino Low Power"
RUN arduino-cli lib install "Adafruit seesaw Library"
RUN arduino-cli lib install "ESP32Time"
RUN arduino-cli lib install "Adafruit MAX1704X"
RUN arduino-cli lib install --git-url https://github.com/sensebox/SSD1306-Plot-Library
RUN arduino-cli lib install --git-url https://github.com/sensebox/sensebox-libweb
RUN arduino-cli lib install --git-url https://github.com/sensebox/SDS011-select-serial
RUN arduino-cli lib install --git-url https://github.com/sensebox/RV8523-RTC-Arduino-Library
RUN arduino-cli lib install --git-url https://github.com/sensebox/BMX055-Arduino-Library
RUN arduino-cli lib install --git-url https://github.com/sensebox/LTR329-Lightsensor-Arduino-Library
RUN arduino-cli lib install --git-url https://github.com/sensebox/VEML6070-UV-Arduino-Library
RUN arduino-cli lib install --git-url https://github.com/bolderflight/ams5915
WORKDIR /app
COPY package.json /app
COPY yarn.lock /app
# test stage
FROM base AS test
ENV NODE_ENV=test
RUN yarn install --pure-lockfile
COPY src /app/src
COPY test /app/test
COPY mocha-reporters.json /app
CMD ["yarn","test"]
# production stage
FROM base AS production
ENV NODE_ENV=production
RUN yarn install --pure-lockfile --production
COPY src /app/src
COPY splash.h ../root/Arduino/libraries/Adafruit_SSD1306/splash.h
# COPY platform.txt /app/src/arduino-ide/packages/arduino/hardware/samd/1.8.11
CMD ["yarn","start"]