-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathDockerfile
41 lines (35 loc) · 1.31 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
FROM ubuntu:20.04
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
cmake \
git \
libc6:i386 \
make \
wget \
&& \
apt-get clean -y && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/make /usr/bin/gmake
ARG WGET_ARGS="-q --show-progress --progress=bar:force:noscroll"
ARG MPLAB_XC8_VERSION=1.45
RUN cd /tmp && \
wget ${WGET_ARGS} https://ww1.microchip.com/downloads/en/DeviceDoc/xc8-v${MPLAB_XC8_VERSION}-full-install-linux-installer.run && \
chmod +x xc8-v${MPLAB_XC8_VERSION}-full-install-linux-installer.run && \
echo 'Running installer (this can take up to a minute)...' && \
./xc8-v${MPLAB_XC8_VERSION}-full-install-linux-installer.run \
--mode unattended --unattendedmodeui none \
--netservername localhost --LicenseType FreeMode --prefix /opt/microchip/xc8 && \
rm xc8-v${MPLAB_XC8_VERSION}-full-install-linux-installer.run
ENV PATH=/opt/microchip/xc8/bin:$PATH
RUN cd /tmp && \
git clone https://github.com/ncopa/su-exec.git && \
cd su-exec && \
make && \
cp -v ./su-exec /usr/local/bin && \
chmod +s /usr/local/bin/su-exec && \
rm -rf /tmp/su-exec