Update Dockerfile
Browse files- Dockerfile +11 -23
Dockerfile
CHANGED
@@ -1,28 +1,16 @@
|
|
1 |
-
|
2 |
-
|
3 |
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
6 |
|
7 |
-
# Set environment variables
|
8 |
-
ENV HOME=/home/user \
|
9 |
-
PATH=/home/user/.local/bin:$PATH \
|
10 |
-
PYTHONUNBUFFERED=1
|
11 |
|
12 |
-
|
13 |
-
WORKDIR /code
|
14 |
|
15 |
-
|
16 |
-
|
17 |
|
18 |
-
|
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"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|