-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
93 lines (77 loc) · 3.44 KB
/
Dockerfile
File metadata and controls
93 lines (77 loc) · 3.44 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FROM quay.io/devfile/universal-developer-image:latest
USER root
# Install EPEL repository, core dependencies, Python 3.12, and Starship
# Also clean yum caches to reduce image size.
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
yum install -y \
fish \
neovim \
vim \
wget \
zsh \
ripgrep \
ca-certificates \
python3.12 && \
yum copr enable -y atim/starship && \
yum install -y starship && \
yum clean all && \
rm -rf /var/cache/yum
# Install uv - the fast Python package installer and resolver
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv's installation directory to the PATH for root and subsequent users
ENV PATH="/root/.cargo/bin:${PATH}"
# Create a Python virtual environment for the ra-aid package and install it
RUN uv venv /opt/ra_aid_venv --python 3.12 \
&& . /opt/ra_aid_venv/bin/activate \
&& uv pip install protobuf==4.25.3 googleapis-common-protos==1.63.0 ra-aid
# Create a Python virtual environment for the aider-chat package and install it
RUN uv venv /opt/aider_chat_venv --python 3.12 \
&& . /opt/aider_chat_venv/bin/activate \
&& uv pip install aider-chat
# Add the bin directories of both virtual environments to the PATH
ENV PATH="/opt/ra_aid_venv/bin:/opt/aider_chat_venv/bin:${PATH}"
# Install chectl
RUN curl -Lo /usr/local/bin/chectl https://che-incubator.github.io/chectl/install.sh && \
chmod +x /usr/local/bin/chectl
# Download and install FiraCode Nerd Font
RUN mkdir -p /usr/local/share/fonts/FiraCode && \
cd /tmp && \
curl -Lo FiraCode.zip https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/FiraCode.zip && \
unzip FiraCode.zip -d /usr/local/share/fonts/FiraCode && \
rm FiraCode.zip && \
fc-cache -fv /usr/local/share/fonts/
# Configure Starship for system-wide use with /opt storage
RUN mkdir -p /opt/starship/config /opt/starship/cache && \
touch /opt/starship/config/starship.toml && \
chown -R 10001:0 /opt/starship && \
chmod -R u=rwX,go=rX /opt/starship
# Set environment variables for Starship to use the /opt locations
ENV STARSHIP_CONFIG="/opt/starship/config/starship.toml"
ENV STARSHIP_CACHE="/opt/starship/cache"
# Bash: Add Starship init to a new script in /etc/profile.d/ for system-wide effect (Bash only)
RUN echo 'if [ -n "$BASH_VERSION" ]; then eval "$(starship init bash)"; fi' > /etc/profile.d/starship.sh && \
chmod +x /etc/profile.d/starship.sh
# Zsh: Create /etc/zshrc with completion initialization and Starship init
RUN printf '%s\n' \
'# System-wide Zshrc configured by Dockerfile' \
'' \
'# Initialize Zsh completion system to ensure SDKMAN and other tools work correctly' \
'if typeset -f compinit >/dev/null; then' \
' autoload -Uz compinit && compinit -u' \
'fi' \
'' \
'# Initialize Zsh bash completion compatibility (for SDKMAN, etc.)' \
'if typeset -f bashcompinit >/dev/null; then' \
' autoload -Uz bashcompinit && bashcompinit' \
'fi' \
'' \
'# Initialize Starship prompt' \
'if command -v starship >/dev/null; then' \
' eval "$(starship init zsh)"' \
'fi' > /etc/zshrc
# Fish: Add Starship init to a new script in /etc/fish/conf.d/ for system-wide effect
RUN mkdir -p /etc/fish/conf.d && \
echo 'if command -v starship > /dev/null; starship init fish | source; end' > /etc/fish/conf.d/starship.fish
USER 10001
# Set fish as default shell for the user
ENV SHELL="/usr/bin/fish"