-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
78 lines (65 loc) · 2.54 KB
/
Dockerfile
File metadata and controls
78 lines (65 loc) · 2.54 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM espressif/idf:v6.0-dev
USER root
RUN apt-get update && apt-get install -y \
sudo \
curl \
gnupg2 \
nano \
bash-completion \
build-essential \
coreutils \
grep \
sed \
util-linux \
locales \
doxygen \
graphviz \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-plain-generic \
latexmk \
clang-format \
cppcheck \
flawfinder \
python3-pip \
cmake \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
# Install cgreen unit testing library (build from source — not in apt repos)
# The shallow clone has no git history, so GITREVISION is never defined by cmake.
# Patch the one line in utils.c that uses it before building.
RUN git clone --depth=1 https://github.com/cgreen-devs/cgreen.git /tmp/cgreen \
&& sed -i \
's/char \*cgreen_library_revision = GITREVISION;/char *cgreen_library_revision = "custom-build";/' \
/tmp/cgreen/src/utils.c \
&& cmake -S /tmp/cgreen -B /tmp/cgreen/build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
&& cmake --build /tmp/cgreen/build --parallel \
&& cmake --install /tmp/cgreen/build \
&& ldconfig \
&& rm -rf /tmp/cgreen
# Install SonarScanner CLI (SonarQube)
ARG SONAR_SCANNER_VERSION=7.1.0.4889
RUN curl -fsSL -o /tmp/sonar-scanner.zip \
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux-x64.zip \
&& apt-get update && apt-get install -y unzip \
&& unzip /tmp/sonar-scanner.zip -d /opt \
&& ln -s /opt/sonar-scanner-${SONAR_SCANNER_VERSION}-linux-x64/bin/sonar-scanner /usr/local/bin/sonar-scanner \
&& rm /tmp/sonar-scanner.zip \
&& rm -rf /var/lib/apt/lists/*
RUN git config --system core.editor "nano" \
&& git config --system --add safe.directory /home/user/Documents/solaris-software
WORKDIR /root
RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
RUN curl -o /etc/bash_completion.d/git-completion.bash \
https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
COPY .devcontainer/setup-terminal.sh /root/setup-terminal.sh
RUN chmod +x /root/setup-terminal.sh
RUN echo "source /etc/bash_completion.d/git-completion.bash" >> /root/.bashrc \
&& echo "source /root/setup-terminal.sh" >> /root/.bashrc \
&& echo "source /opt/esp/idf/export.sh >/dev/null 2>&1" >> /root/.bashrc
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
USER root