-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.base
52 lines (42 loc) · 1.72 KB
/
Dockerfile.base
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
# Download and build headers manually for Docker Desktop, as the required kernel headers may not be available.
FROM ubuntu:22.04 AS header-builder
COPY ./build/build_kernel_header.sh /usr/local/bin/build_kernel_header
RUN chmod +x /usr/local/bin/build_kernel_header
RUN apt-get update -y
RUN apt-get install -y wget
# for building headers
RUN apt-get install -y make build-essential flex bison bc
RUN /usr/local/bin/build_kernel_header
FROM ubuntu:22.04
COPY --from=header-builder /linux-headers /linux-headers
RUN mkdir -p /lib/modules/$(uname -r)
RUN ln -s /linux-headers /lib/modules/$(uname -r)/build
RUN apt-get update -y
# bcc tools are installed in /usr/share/bcc/tools, for example /usr/sbin/opensnoop-bpfcc
RUN apt-get install -y bpfcc-tools
RUN apt-get install -y curl
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.78.0
ENV PATH="/root/.cargo/bin:${PATH}"
RUN apt-get install -y git
RUN apt-get install -y \
build-essential \
zlib1g-dev \
libssl-dev \
libreadline-dev \
libyaml-dev \
libxml2-dev \
libxslt-dev \
libclang-dev
RUN git clone https://github.com/sstephenson/rbenv.git /root/.rbenv
RUN git clone https://github.com/sstephenson/ruby-build.git /root/.rbenv/plugins/ruby-build
RUN /root/.rbenv/plugins/ruby-build/install.sh
ENV PATH /root/.rbenv/bin:$PATH
RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
RUN chmod +x /etc/profile.d/rbenv.sh
RUN echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(rbenv init -)"' >> ~/.bashrc
ENV RBENV_ROOT /root/.rbenv
RUN rbenv install 3.1.5 && rbenv global 3.1.5
RUN /bin/bash -c "source /etc/profile.d/rbenv.sh && gem install bundler"
RUN apt-get install -y vim gdb
CMD ["bash"]