-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
77 lines (61 loc) · 2.77 KB
/
Dockerfile
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
FROM ubuntu:22.04
SHELL ["bash", "-c"]
# Need to install wget to fetch sources from the internet
# Install GCC, G++, Python, CPython Headers, Build Essential tools like Make
RUN apt-get update && apt-get install --no-install-recommends -y ca-certificates\
wget build-essential python3.11 python3.11-venv python3-pip python3-dev libpython3.11-dev\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Download Java 17
RUN wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.deb --no-check-certificate
# Install Java 17 and other necessary software
RUN apt-get update && apt-get install --no-install-recommends -y curl unzip vim \
./jdk-17_linux-x64_bin.deb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js v22
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
RUN apt-get install --no-install-recommends -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="$PATH:/root/.cargo/bin"
RUN rustup update && rustup install stable
# Install Git
RUN apt-get update && apt-get install --no-install-recommends -y git\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Valgrind
RUN apt-get update && apt-get install --no-install-recommends -y valgrind\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Bash Completion
RUN apt-get update && apt-get install --no-install-recommends -y bash-completion\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN echo "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc
ENV HOME /home/root
WORKDIR $HOME
# Install Git Prompt
RUN wget -O ~/.git-prompt.sh --no-check-certificate \
https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh \
&& rm -fr ~/.wget-hsts
RUN echo "source ~/.git-prompt.sh" >> ~/.bashrc
# Setup User Prompts
RUN echo "export PS1='\\[\\e[1m\\]\\[\\e[32m\\]\\u\\[\\e[0m\\]\\[\\e[35m\\] @\\[\\e[0m\\] \\[\\e[3m\\]\\[\\e[34m\\]\\W\\[\\e[0m\\] \$(__git_ps1 \"\\[\\e[35m\\]on \\[\\e[33m\\]\\[\\e[3m\\]%s \")\\[\\e[0m\\]\\[\\e[35m\\]\$\\[\\e[0m\\]\\[\\e[33m\\]:\\[\\e[0m\\] \\[\\e[36m\\]'" >> ~/.bashrc
# Shortcut for python3
RUN echo "alias py=python3.11" >> ~/.bashrc
RUN echo "alias python=python3.11" >> ~/.bashrc
RUN echo "alias python3=python3.11" >> ~/.bashrc
RUN echo "alias pip='python3.11 -m pip'" >> ~/.bashrc
# Upgrade python
RUN python3.11 -m pip list --outdated --format=freeze \
| grep -v '^\-e' \
| cut -d = -f 1 \
| xargs -n1 python3.11 -m pip install -U
# For some reason, python3-pip installs pip with python3.10
# Remove python3.10
RUN find /usr/bin/ | grep "3.10" | xargs -n1 rm -fr
ENTRYPOINT ["bash"]