docker-keil/Dockerfile

52 lines
1.2 KiB
Docker
Raw Normal View History

2023-03-23 12:08:06 +00:00
ARG USER_NAME=keil
2023-03-24 08:12:22 +00:00
FROM scottyhardy/docker-wine:devel-8.4
2023-03-23 12:08:06 +00:00
ARG USER_NAME
2023-03-27 10:24:29 +00:00
ARG KEIL_URL=
ARG PACK_URL=
ARG DEBUG=
2023-03-23 12:08:06 +00:00
RUN \
apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
dwm \
clangd \
gdb-multiarch \
htop \
inotify-tools \
python3 \
python-is-python3 \
python3-pip \
ssh \
vim \
xmlstarlet \
&& { \
2023-03-25 18:59:20 +00:00
[ "$DEBUG" -eq 1 ] \
2023-03-23 12:08:06 +00:00
|| true; \
} \
&& rm -rf /var/lib/apt/lists/
RUN pip install pyocd
2023-03-27 10:24:29 +00:00
COPY ./install-keil.sh .
2023-03-23 12:08:06 +00:00
RUN \
2023-03-27 10:24:29 +00:00
./install-keil.sh && \
rm ./install-keil.sh
2023-03-23 12:08:06 +00:00
RUN \
apt-get update && \
ln -s "$(which true)" /usr/bin/depmod && \
wget https://github.com/stlink-org/stlink/releases/download/v1.7.0/stlink_1.7.0-1_amd64.deb --progress=bar:force:noscroll -O stlink.deb && \
dpkg -i stlink.deb; \
apt-get install --fix-broken -y && \
rm -rf /var/lib/apt/lists/ && \
rm stlink.deb
RUN ln -s /usr/bin/gdb-multiarch /usr/bin/arm-none-eabi-gdb
RUN echo "${USER_NAME} ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/keil
2023-03-23 12:11:30 +00:00
COPY ./compile.sh /bin/st-compile
RUN chmod a+x /bin/st-compile
2023-03-23 12:08:06 +00:00
ENV USER_NAME=${USER_NAME}