ChloeLilyMu commited on
Commit
91b226f
·
verified ·
1 Parent(s): 0c3f673

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -6
Dockerfile CHANGED
@@ -1,6 +1,15 @@
1
  FROM ubuntu:22.04
2
 
3
- RUN apt-get update && apt-get install -y tar libgnutls30 libssl-dev bash && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
4
 
5
  WORKDIR /app
6
 
@@ -8,13 +17,19 @@ COPY 40990sign.tar.gz /app/40990sign.tar.gz
8
 
9
  ENV LD_LIBRARY_PATH=/app/40990sign:$LD_LIBRARY_PATH
10
  ENV PORT=7860
 
11
  EXPOSE 7860
12
 
13
- # 解压并启动
14
- CMD bash -c "\
15
  tar -xvf /app/40990sign.tar.gz -C /app && \
16
- chmod +x /app/40990sign/sign && \
17
- chmod +r /app/40990sign/*.so && \
18
  cd /app/40990sign && \
19
- ./sign \
 
 
 
 
 
20
  "
 
1
  FROM ubuntu:22.04
2
 
3
+ RUN apt-get update && \
4
+ apt-get install -y --no-install-recommends \
5
+ tar \
6
+ ca-certificates \
7
+ binutils \
8
+ libgnutls30 \
9
+ libssl-dev \
10
+ bash \
11
+ strace \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
  WORKDIR /app
15
 
 
17
 
18
  ENV LD_LIBRARY_PATH=/app/40990sign:$LD_LIBRARY_PATH
19
  ENV PORT=7860
20
+ ENV RUST_BACKTRACE=1
21
  EXPOSE 7860
22
 
23
+ CMD bash -lc "\
24
+ echo 'Extracting...' && \
25
  tar -xvf /app/40990sign.tar.gz -C /app && \
26
+ if [ ! -d /app/40990sign ]; then echo 'ERROR: expected /app/40990sign but not found'; ls -la /app; exit 1; fi && \
27
+ chmod +x /app/40990sign/sign || true && chmod +r /app/40990sign/*.so || true && \
28
  cd /app/40990sign && \
29
+ echo '=== file sign ===' > /app/40990sign/debug_info.txt && file ./sign >> /app/40990sign/debug_info.txt 2>&1 && \
30
+ echo '=== readelf -h sign ===' >> /app/40990sign/debug_info.txt && readelf -h ./sign >> /app/40990sign/debug_info.txt 2>&1 || true && \
31
+ echo '=== ldd sign ===' >> /app/40990sign/debug_info.txt && ldd ./sign >> /app/40990sign/debug_info.txt 2>&1 || true && \
32
+ echo '=== ldd libsymbols.so ===' >> /app/40990sign/debug_info.txt && ldd ./libsymbols.so >> /app/40990sign/debug_info.txt 2>&1 || true && \
33
+ echo '=== start sign (RUST_BACKTRACE=1) ===' >> /app/40990sign/debug_info.txt && \
34
+ RUST_BACKTRACE=1 LD_LIBRARY_PATH=/app/40990sign:$LD_LIBRARY_PATH ./sign 2>&1 | tee -a /app/40990sign/debug_info.txt \
35
  "