-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
autoconf \ | ||
automake \ | ||
bear \ | ||
build-essential \ | ||
cgroup-tools \ | ||
clang \ | ||
clang-tidy \ | ||
clang-tools \ | ||
cmake \ | ||
diffutils \ | ||
dnsutils \ | ||
file \ | ||
findutils \ | ||
flex \ | ||
g++ \ | ||
gcc \ | ||
gcc-arm-none-eabi \ | ||
gcc-multilib \ | ||
gettext \ | ||
git \ | ||
gnulib \ | ||
libcgroup-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
libzstd-dev \ | ||
lld \ | ||
llvm \ | ||
llvm-dev \ | ||
lzip \ | ||
make \ | ||
pip \ | ||
pkg-config \ | ||
procps \ | ||
python3-dev \ | ||
sudo \ | ||
texinfo \ | ||
tzdata \ | ||
unzip \ | ||
vim \ | ||
vim-common \ | ||
wget \ | ||
xz-utils \ | ||
zlib1g.dev \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN cd /tmp \ | ||
&& wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz \ | ||
&& rm -rf /usr/local/go \ | ||
&& tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz | ||
|
||
RUN cd /tmp \ | ||
&& wget https://github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-linux-x86_64 \ | ||
&& mv bazel-6.4.0-linux-x86_64 /usr/local/bin/bazel \ | ||
&& chmod +x /usr/local/bin/bazel | ||
|
||
ARG USERNAME=build | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
USER $USERNAME | ||
WORKDIR /home/$USERNAME | ||
|
||
RUN git clone https://github.com/naivesystems/analyze.git | ||
WORKDIR /home/$USERNAME/analyze | ||
|
||
ENV PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
|
||
RUN make | ||
RUN sed -i 's/podman build/@echo podman build/g' podman_image/Makefile | ||
RUN sed -i 's/rm -rf tmpWorkSpace/@echo/g' podman_image/Makefile | ||
RUN make -C podman_image build-en |