-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (36 loc) · 1.75 KB
/
Dockerfile
File metadata and controls
50 lines (36 loc) · 1.75 KB
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
FROM ubuntu:20.04 as base
ARG GCC_ARM_NONE_EABI_VERSION_ARG
ARG TARGET_ARCHITECTURE_ARG
ENV DEBIAN_FRONTEND=noninteractive
ENV GCC_ARM_NONE_EABI_VERSION=$GCC_ARM_NONE_EABI_VERSION_ARG
ENV TARGET_ARCHITECTURE=$TARGET_ARCHITECTURE_ARG
ENV DOWNLOADED_PACKAGES_LOCATION=/home/.downloaded_packages
ENV INSTALLATION_SCRIPTS_LOCATION=/home/.scripts
ENV CREATE_PROJECT_SCRIPT=/home/.scripts
COPY setup/downloaded_packages ${DOWNLOADED_PACKAGES_LOCATION}
COPY setup/container_packages_installation_scripts ${INSTALLATION_SCRIPTS_LOCATION}
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y pixz wget curl gcc g++ git unzip subversion autoconf pkg-config automake libtool cmake make build-essential ninja-build zsh \
libusb-1.0.0 libusb-dev libusb-1.0.0-dev gnupg libncursesw5 libncurses5-dev \
bash-completion vim htop libreadline-dev clang clang-tidy lcov flawfinder cppcheck && \
apt-get clean
#install scripts
RUN chmod +x ${INSTALLATION_SCRIPTS_LOCATION}/*
#install openocd
RUN /home/.scripts/install_openocd.sh
#install the arm toolchain
RUN /home/.scripts/install_arm_toolchain.sh
RUN echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list.d/jammy.list &&\
apt update -y && \
apt install -y -t jammy gcc && \
rm /etc/apt/sources.list.d/jammy.list &&\
apt update -y &&\
apt-get clean
RUN apt-get update && \
apt-get -o Dpkg::Options::="--force-overwrite" install -y gdb-multiarch
COPY setup/create_project ${CREATE_PROJECT_SCRIPT}
ENV PATH="${PATH}:${CREATE_PROJECT_SCRIPT}"
# Set zsh as the default shell
RUN sed -i -e "s/bin\/bash/bin\/zsh/" /etc/passwd
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"