-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.esp8266
65 lines (56 loc) · 1.59 KB
/
Dockerfile.esp8266
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
FROM debian:bookworm-20240926-slim
ARG GIT_TAG
ENV ARDUINO_VERSION="1.8.19"
ENV GIT_TAG=${GIT_TAG}
ENV DEBIAN_FRONTEND=noninteractive
ENV ESP8266_VERSION="3.1.2"
RUN apt-get -y -qq update && \
apt-get -y -qq --no-install-recommends --allow-change-held-packages install \
software-properties-common \
wget \
zip \
git \
make \
srecord \
bc \
xz-utils \
gcc \
curl \
xvfb \
python3 \
python3-dev \
python3-pip \
build-essential \
libncurses-dev \
flex \
bison \
gperf \
libxrender1 \
libxtst6 \
libxi6 \
jq \
mc \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /opt
# Get pinned version of Arduino IDE
RUN curl https://downloads.arduino.cc/arduino-$ARDUINO_VERSION-linux64.tar.xz > ./arduino-$ARDUINO_VERSION-linux64.tar.xz \
&& unxz -q ./arduino-$ARDUINO_VERSION-linux64.tar.xz \
&& tar -xvf arduino-$ARDUINO_VERSION-linux64.tar \
&& rm -rf arduino-$ARDUINO_VERSION-linux64.tar \
&& mv ./arduino-$ARDUINO_VERSION ./arduino \
&& cd ./arduino \
&& ./install.sh \
&& rm -rf /root/.arduino15/packages/esp8266/hardware/esp8266/3.0.2
# Hardening and optimization: clean apt lists
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Installing the board support package
RUN /opt/arduino/arduino \
--pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" \
--save-prefs \
&& /opt/arduino/arduino \
--install-boards esp8266:esp8266:${ESP8266_VERSION} \
--save-prefs
RUN mkdir /opt/workspace
WORKDIR /opt/workspace
COPY cmd.sh /opt/
CMD [ "/opt/cmd.sh" ]