-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
32 lines (26 loc) · 1.23 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
FROM ubuntu:20.04
ARG MPLABX_VERSION=5.45
ARG XC8_VERSION=1.34
# Install the dependencies
# See https://microchipdeveloper.com/install:mplabx-lin64
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y libc6:i386 libx11-6:i386 libxext6:i386 libstdc++6:i386 libexpat1:i386 wget sudo make && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/*
# Download and install XC8
RUN wget -nv -O /tmp/xc8 "https://ww1.microchip.com/downloads/en/DeviceDoc/xc8-v${XC8_VERSION}-full-install-linux-installer.run" && \
chmod +x /tmp/xc8 && \
/tmp/xc8 --mode unattended --unattendedmodeui none --netservername localhost --LicenseType FreeMode --prefix "/opt/microchip/xc8/v${XC8_VERSION}" && \
rm /tmp/xc8
# Download and install MPLAB X
RUN wget -nv -O /tmp/mplabx "https://ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-v${MPLABX_VERSION}-linux-installer.tar" &&\
cd /tmp && \
tar -xf mplabx && \
rm mplabx && \
mv "MPLABX-v${MPLABX_VERSION}-linux-installer.sh" mplabx && \
sudo ./mplabx --nox11 -- --unattendedmodeui none --mode unattended --ipe 0 --collectInfo 0 --installdir /opt/mplabx --16bitmcu 0 --32bitmcu 0 --othermcu 0 && \
rm mplabx
COPY build.sh /build.sh
ENTRYPOINT [ "/build.sh" ]