-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.loongarch
45 lines (26 loc) · 1.15 KB
/
Dockerfile.loongarch
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
FROM cr.loongnix.cn/library/python:3.11.9-slim-buster
LABEL authors="fsj, yf"
EXPOSE 8000
ARG RUST_INSTALL_PACKAGE=rust-1.80.0-loongarch64-linux.tar.xz
USER root
WORKDIR /
RUN apt update
RUN apt install -y gcc libpq-dev libffi-dev libmagic1 g++ wget libssl-dev pkg-config
RUN wget https://lib.storage.pigeon-server.cn/$RUST_INSTALL_PACKAGE
RUN mkdir rust-install
RUN tar -xvf $RUST_INSTALL_PACKAGE -C rust-install
RUN ./rust-install/install.sh
RUN rm $RUST_INSTALL_PACKAGE
RUN rm -rf ./rust-install
RUN mkdir -p /root/.cargo && \
echo "[source.crates-io]" > /root/.cargo/config.toml && \
echo "replace-with = 'mirror'" >> /root/.cargo/config.toml && \
echo "" >> /root/.cargo/config.toml && \
echo "[source.mirror]" >> /root/.cargo/config.toml && \
echo "registry = \"sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/\"" >> /root/.cargo/config.toml
COPY . /app
WORKDIR /app
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install --no-cache-dir cryptography==42.0.8
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000", "--noreload"]