Fuegovic commited on
Commit
378ac57
1 Parent(s): 7cd4564

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -23
Dockerfile CHANGED
@@ -1,28 +1,16 @@
1
- # Use the image from GitHub Container Registry
2
- FROM ghcr.io/gngpp/ninja:latest
3
 
4
- # User Setup (if needed)
5
- RUN useradd -m -u 1001 user
 
 
 
6
 
7
- # Set environment variables
8
- ENV HOME=/home/user \
9
- PATH=/home/user/.local/bin:$PATH \
10
- PYTHONUNBUFFERED=1
11
 
12
- # Set the working directory in the container to the application directory
13
- WORKDIR /code
14
 
15
- # Copy Python requirements file
16
- COPY requirements.txt .
17
 
18
- # Install Python dependencies
19
- RUN pip install --no-cache-dir -r requirements.txt
20
-
21
- # Copy your application files into the container
22
- COPY . /code
23
-
24
- # Expose any ports your application might use (if applicable)
25
- EXPOSE 7860
26
-
27
- # Specify the command to run your Node.js application
28
- CMD ["node", "server.js"]
 
1
+ FROM debian:bullseye-slim
2
+ RUN apt-get update && apt-get install -y curl
3
 
4
+ RUN version=$(basename $(curl -sL -o /dev/null -w %{url_effective} https://github.com/gngpp/ninja/releases/latest)) \
5
+ && base_url="https://github.com/gngpp/ninja/releases/expanded_assets/$version" \
6
+ && latest_url=https://github.com/$(curl -sL $base_url | grep -oP 'href=".*x86_64.*musl\.tar\.gz(?=")' | sed 's/href="//') \
7
+ && curl -Lo ninja.tar.gz $latest_url \
8
+ && tar -xzf ninja.tar.gz
9
 
 
 
 
 
10
 
11
+ ENV LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive LANG=zh_CN.UTF-8 LANGUAGE=zh_CN.UTF-8 LC_ALL=C
 
12
 
13
+ RUN cp ninja /bin/ninja
14
+ RUN mkdir /.ninja && chmod 777 /.ninja
15
 
16
+ CMD ["/bin/ninja","run"]