ngoctuanai commited on
Commit
0c8cbd4
1 Parent(s): 61d781e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 /.gpt3 && chmod 777 /.gpt3
15
+ RUN mkdir /.gpt4 && chmod 777 /.gpt4
16
+ RUN mkdir /.auth && chmod 777 /.auth
17
+ RUN mkdir /.platform && chmod 777 /.platform
18
+
19
+ CMD ["/bin/ninja","run"]