Newer
Older
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
# Use AlmaLinux 9 base image
FROM almalinux:9
RUN useradd -m vscode
RUN dnf --best --assumeyes update \
&& dnf -y install \
python3.11 \
python3.11-pip \
gcc \
make \
cmake \
git \
zsh \
which \
util-linux-user \
&& dnf clean all \
&& chsh -s /bin/zsh vscode
WORKDIR /workspaces
USER vscode
RUN python3.11 -m venv /workspaces/.venv
COPY requirements.txt /workspaces/requirements.txt
COPY requirements-dev.txt /workspaces/requirements-dev.txt
COPY .devcontainer/install_zsh.sh /workspaces/install_zsh.sh
RUN /workspaces/install_zsh.sh
RUN echo 'source /workspaces/.venv/bin/activate' >> ~/.zshrc \
&& source /workspaces/.venv/bin/activate \
&& pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
&& pip install --upgrade pip \
&& pip install -r requirements-dev.txt
RUN rm -rf /workspaces/requirements.txt /workspaces/requirements-dev.txt /workspaces/install_zsh.sh