mtproto_proxy icon indicating copy to clipboard operation
mtproto_proxy copied to clipboard

Download failure of multimedia messages in Docker edition

Open mhasgari opened this issue 2 years ago • 7 comments

Hi Installing the MTProto_Proxy on Docker using different methods mentioned on the project docs, the proxy on the clients works fine for text messages, but fails to download multimedia messages! What would cause this problem?

mhasgari avatar May 23 '23 02:05 mhasgari

Hi. The Docker Hub version is outdated (because they removed the free access for opensource projects), so I think it will only work if you build it yourself as described here:

https://github.com/seriyps/mtproto_proxy#to-run-with-custom-config-file

seriyps avatar May 23 '23 07:05 seriyps

Thanks, but when I try to build the Docker image, I face some errors. Here is the complete log:

[+] Building 11.2s (9/22)
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.1s
 => => transferring dockerfile: 892B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/alpine:3.9                                                                                                                                                 0.4s
 => [internal] load metadata for docker.io/library/erlang:21-alpine                                                                                                                                           0.4s
 => CACHED [builder  1/12] FROM docker.io/library/erlang:21-alpine@sha256:7b77dba3d0207eab81fd11a90569b8a08ca56a5c660bba02b69be630ddc6befe                                                                    0.0s
 => [internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 1.45kB                                                                                                                                                                           0.0s
 => CACHED [stage-1 1/5] FROM docker.io/library/alpine:3.9@sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011                                                                            0.0s
 => ERROR [stage-1 2/5] RUN apk add --no-cache openssl &&     apk add --no-cache ncurses-libs &&     apk add --no-cache dumb-init                                                                            10.5s
 => ERROR [builder  2/12] RUN apk add --no-cache git                                                                                                                                                         10.5s
------
 > [stage-1 2/5] RUN apk add --no-cache openssl &&     apk add --no-cache ncurses-libs &&     apk add --no-cache dumb-init:
#0 0.450 fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
#0 5.454 fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
#0 5.454 WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz: temporary error (try again later)
#0 10.46   openssl (missing):
#0 10.46     required by: world[openssl]
#0 10.46 WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz: temporary error (try again later)
#0 10.46 ERROR: unsatisfiable constraints:
------
------
 > [builder  2/12] RUN apk add --no-cache git:
#0 0.445 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
#0 5.451 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
#0 5.451 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)
#0 10.46   git (no such package):
#0 10.46     required by: world[git]
#0 10.46 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: temporary error (try again later)
#0 10.46 ERROR: unable to select packages:
------
Dockerfile:21
--------------------
  20 |     FROM alpine:3.9
  21 | >>> RUN apk add --no-cache openssl && \
  22 | >>>     apk add --no-cache ncurses-libs && \
  23 | >>>     apk add --no-cache dumb-init
  24 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apk add --no-cache openssl &&     apk add --no-cache ncurses-libs &&     apk add --no-cache dumb-init" did not complete successfully: exit code: 1

mhasgari avatar May 23 '23 09:05 mhasgari

Oh, it might be that Alpine linux 3.9 is no longer available? Can you try to edit the Dockerfile and replace the following lines:

- FROM erlang:21-alpine as builder
+ FROM erlang:24-alpine as builder

- FROM alpine:3.9
+ FROM alpine:3.18

and run docker build -t mtproto-proxy-erl . again?

seriyps avatar May 23 '23 10:05 seriyps

Did it, but not successful either:

[+] Building 11.2s (9/22)
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.1s
 => => transferring dockerfile: 893B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                             0.1s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/alpine:3.18                                                                                                                                                0.2s
 => [internal] load metadata for docker.io/library/erlang:24-alpine                                                                                                                                           0.4s
 => CACHED [builder  1/12] FROM docker.io/library/erlang:24-alpine@sha256:51e0f2b9f3e82ba59257ae22bc6cb740efccfe0e1026332e9e69fa807e43a831                                                                    0.0s
 => [internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 1.45kB                                                                                                                                                                           0.0s
 => CACHED [stage-1 1/5] FROM docker.io/library/alpine:3.18@sha256:02bb6f428431fbc2809c5d1b41eab5a68350194fb508869a33cb1af4444c9b11                                                                           0.0s
 => ERROR [stage-1 2/5] RUN apk add --no-cache openssl &&     apk add --no-cache ncurses-libs &&     apk add --no-cache dumb-init                                                                            10.5s
 => CANCELED [builder  2/12] RUN apk add --no-cache git                                                                                                                                                      10.6s
------
 > [stage-1 2/5] RUN apk add --no-cache openssl &&     apk add --no-cache ncurses-libs &&     apk add --no-cache dumb-init:
#0 0.392 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
#0 5.398 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
#0 5.398 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/main: temporary error (try again later)
#0 10.40 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/community: temporary error (try again later)
#0 10.40 ERROR: unable to select packages:
#0 10.40   openssl (no such package):
#0 10.40     required by: world[openssl]
------
Dockerfile:21
--------------------
  20 |     FROM alpine:3.18
  21 | >>> RUN apk add --no-cache openssl && \
  22 | >>>     apk add --no-cache ncurses-libs && \
  23 | >>>     apk add --no-cache dumb-init
  24 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apk add --no-cache openssl &&     apk add --no-cache ncurses-libs &&     apk add --no-cache dumb-init" did not complete successfully: exit code: 1

mhasgari avatar May 23 '23 11:05 mhasgari

I appreciate it if you tell me how should I build the Docker image without any errors. Thanks

mhasgari avatar May 24 '23 13:05 mhasgari

Hi. The Docker Hub version is outdated (because they removed the free access for opensource projects), so I think it will only work if you build it yourself as described here:

https://github.com/seriyps/mtproto_proxy#to-run-with-custom-config-file

Would you please consider using Github Container registry instead of Docker Hub?

temperance447 avatar May 29 '23 09:05 temperance447

Hi. The Docker Hub version is outdated (because they removed the free access for opensource projects), so I think it will only work if you build it yourself as described here: https://github.com/seriyps/mtproto_proxy#to-run-with-custom-config-file

Would you please consider using Github Container registry instead of Docker Hub?

You mean the project contributors should consider using GitHub Container registry instead of Docker Hub, so that we can use it, am I right?

mhasgari avatar May 30 '23 13:05 mhasgari