Riaz485 commited on
Commit
2a3d901
·
verified ·
1 Parent(s): a0d4105

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -3,8 +3,13 @@
3
  # ==============================================================================
4
  FROM elixir:1.15-alpine AS builder
5
 
6
- # Zaroori build tools install karein
7
- RUN apk add --no-cache git build-base
 
 
 
 
 
8
 
9
  WORKDIR /build
10
 
@@ -14,7 +19,7 @@ RUN git clone https://github.com/riaz472/analytics.git .
14
  # Environment set karein production ke liye
15
  ENV MIX_ENV=prod
16
 
17
- # Dependencies aur compile ek sath
18
  RUN mix local.hex --force && \
19
  mix local.rebar --force && \
20
  mix deps.get --only prod && \
@@ -29,11 +34,10 @@ RUN mix release
29
  FROM alpine:latest
30
  RUN apk add --no-cache openssl ncurses-libs libstdc++ bash
31
 
32
- # Hugging Face Spaces ke liye standard non-root user banana zaroori hai
33
  RUN adduser -D -u 1000 user
34
  USER user
35
 
36
- # Home aur App directory setups
37
  ENV HOME=/home/user
38
  WORKDIR /app
39
 
 
3
  # ==============================================================================
4
  FROM elixir:1.15-alpine AS builder
5
 
6
+ # Zaroori build tools aur SSH/Git configurations install karein
7
+ RUN apk add --no-cache git build-base openssh-client
8
+
9
+ # Git network optimization taake external repos fast aur bina freeze ke download hon
10
+ RUN git config --global core.compression 0 && \
11
+ git config --global protocol.version 2 && \
12
+ git config --global http.postBuffer 524288000
13
 
14
  WORKDIR /build
15
 
 
19
  # Environment set karein production ke liye
20
  ENV MIX_ENV=prod
21
 
22
+ # Dependencies fetching aur compilation
23
  RUN mix local.hex --force && \
24
  mix local.rebar --force && \
25
  mix deps.get --only prod && \
 
34
  FROM alpine:latest
35
  RUN apk add --no-cache openssl ncurses-libs libstdc++ bash
36
 
37
+ # Hugging Face Spaces ke liye standard non-root user
38
  RUN adduser -D -u 1000 user
39
  USER user
40
 
 
41
  ENV HOME=/home/user
42
  WORKDIR /app
43