[GH-ISSUE #1308] 树莓派3B+ 无法使用snowdreamtech/frpc镜像 #1036

Closed
opened 2026-05-05 12:40:00 -06:00 by gitea-mirror · 14 comments
Owner

Originally created by @chendachao on GitHub (Jul 7, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1308

What version of frp are you using (./frpc -v or ./frps -v)?
snowdreamtech/frpc:0.24.1

What operating system and processor architecture are you using (go env)?
Raspberry pi:Raspbian

$docker -v
Docker version 18.09.7, build 2d0083d
$ uname -a
Linux raspberrypi 4.19.56-v7+ #1242 SMP Wed Jun 26 17:31:47 BST 2019 armv7l GNU/Linux

Configures you used:

[common]
server_addr = <myip>
server_port = 7000

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

[web]
type = http
local_port = 8001

Steps to reproduce the issue:
docker run --network host -d -v /etc/frp/frpc.ini:/etc/frp/frpc.ini --restart=always --name frpc snowdream/frpc

Describe the results you received:
standard_init_linux.go:207: exec user process caused "exec format error"

Describe the results you expected:
snowdreamtech/frpc镜像正常运行

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)
找到了这个 https://github.com/containers/buildah/issues/475#issuecomment-397861089 ,但是不确定要怎么改

Originally created by @chendachao on GitHub (Jul 7, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1308 **What version of frp are you using (./frpc -v or ./frps -v)?** `snowdreamtech/frpc:0.24.1` **What operating system and processor architecture are you using (`go env`)?** `Raspberry pi:Raspbian` ``` $docker -v Docker version 18.09.7, build 2d0083d $ uname -a Linux raspberrypi 4.19.56-v7+ #1242 SMP Wed Jun 26 17:31:47 BST 2019 armv7l GNU/Linux ``` **Configures you used:** ``` [common] server_addr = <myip> server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 [web] type = http local_port = 8001 ``` **Steps to reproduce the issue:** `docker run --network host -d -v /etc/frp/frpc.ini:/etc/frp/frpc.ini --restart=always --name frpc snowdream/frpc` **Describe the results you received:** `standard_init_linux.go:207: exec user process caused "exec format error"` **Describe the results you expected:** snowdreamtech/frpc镜像正常运行 **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)** 找到了这个 https://github.com/containers/buildah/issues/475#issuecomment-397861089 ,但是不确定要怎么改
Author
Owner

@wmysh commented on GitHub (Jul 8, 2019):

构架错误。这个没有必要使用Docker,毕竟就只有一个二进制文件和一个配置文件,没有复杂的依赖关系。如果非要使用Docker,需要自己修改Dockerfile,自己生成容器镜像。

<!-- gh-comment-id:509116630 --> @wmysh commented on GitHub (Jul 8, 2019): 构架错误。这个没有必要使用Docker,毕竟就只有一个二进制文件和一个配置文件,没有复杂的依赖关系。如果非要使用Docker,需要自己修改Dockerfile,自己生成容器镜像。
Author
Owner

@chendachao commented on GitHub (Jul 8, 2019):

@WuYehow ,因为涉及到开机自启动等问题,毕竟用Docker方便一些,可以推出适合这个架构的Docker镜像吗?

<!-- gh-comment-id:509117872 --> @chendachao commented on GitHub (Jul 8, 2019): @WuYehow ,因为涉及到开机自启动等问题,毕竟用Docker方便一些,可以推出适合这个架构的Docker镜像吗?
Author
Owner

@wmysh commented on GitHub (Jul 8, 2019):

我顺手改了下,你试试,不行的话把日志发出来。

FROM arm32v7/alpine:3.9

ENV FRP_VERSION 0.24.1

VOLUME [ “/sys/fs/cgroup” ]

RUN apk add --no-cache openrc \
    && cd /root \
    &&  wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz \
    &&  tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz  \
    &&  cd frp_${FRP_VERSION}_linux_arm/ \
    &&  cp frpc /usr/bin/ \
    &&  mkdir -p /etc/frp \
    &&  cp frpc.ini /etc/frp \
    &&  cd /root \
    &&  rm frp_${FRP_VERSION}_linux_arm.tar.gz \
    &&  rm -rf frp_${FRP_VERSION}_linux_arm/ 

ENTRYPOINT /usr/bin/frpc -c /etc/frp/frpc.ini
<!-- gh-comment-id:509118184 --> @wmysh commented on GitHub (Jul 8, 2019): 我顺手改了下,你试试,不行的话把日志发出来。 ``` FROM arm32v7/alpine:3.9 ENV FRP_VERSION 0.24.1 VOLUME [ “/sys/fs/cgroup” ] RUN apk add --no-cache openrc \ && cd /root \ && wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz \ && tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz \ && cd frp_${FRP_VERSION}_linux_arm/ \ && cp frpc /usr/bin/ \ && mkdir -p /etc/frp \ && cp frpc.ini /etc/frp \ && cd /root \ && rm frp_${FRP_VERSION}_linux_arm.tar.gz \ && rm -rf frp_${FRP_VERSION}_linux_arm/ ENTRYPOINT /usr/bin/frpc -c /etc/frp/frpc.ini ```
Author
Owner

@chendachao commented on GitHub (Jul 8, 2019):

构建镜像的时候遇到如下错误:

$ docker build -t frpc .
Sending build context to Docker daemon  47.62kB
Step 1/5 : FROM arm32v7/alpine:3.9
3.9: Pulling from arm32v7/alpine
856f4240f8db: Pull complete
Digest: sha256:f6d15ec5c7cf08079309c59f59ff1e092eb9a678ab891257b1d2b118e7aecc2b
Status: Downloaded newer image for arm32v7/alpine:3.9
 ---> ea2ccc7da15e
Step 2/5 : ENV FRP_VERSION 0.24.1
 ---> Running in 21d436e4d1e9
Removing intermediate container 21d436e4d1e9
 ---> f9b71ed6adbb
Step 3/5 : VOLUME [ “/sys/fs/cgroup” ]
 ---> Running in 7b4096dd4105
Removing intermediate container 7b4096dd4105
 ---> 4067100e1239
Step 4/5 : RUN apk add --no-cache openrc     && cd /root     &&  wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz     &&  tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz      &&  cd frp_${FRP_VERSION}_linux_arm/     &&  cp frpc /usr/bin/     &&  mkdir -p /etc/frp     &&  cp frpc.ini /etc/frp     &&  cd /root     &&  rm frp_${FRP_VERSION}_linux_arm.tar.gz     &&  rm -rf frp_${FRP_VERSION}_linux_arm/
 ---> Running in 78e4244651ee
standard_init_linux.go:207: exec user process caused "exec format error"
The command '/bin/sh -c apk add --no-cache openrc     && cd /root     &&  wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz     &&  tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz      &&  cd frp_${FRP_VERSION}_linux_arm/     &&  cp frpc /usr/bin/     &&  mkdir -p /etc/frp     &&  cp frpc.ini /etc/frp     &&  cd /root     &&  rm frp_${FRP_VERSION}_linux_arm.tar.gz     &&  rm -rf frp_${FRP_VERSION}_linux_arm/' returned a non-zero code: 1

<!-- gh-comment-id:509121455 --> @chendachao commented on GitHub (Jul 8, 2019): 构建镜像的时候遇到如下错误: ``` $ docker build -t frpc . Sending build context to Docker daemon 47.62kB Step 1/5 : FROM arm32v7/alpine:3.9 3.9: Pulling from arm32v7/alpine 856f4240f8db: Pull complete Digest: sha256:f6d15ec5c7cf08079309c59f59ff1e092eb9a678ab891257b1d2b118e7aecc2b Status: Downloaded newer image for arm32v7/alpine:3.9 ---> ea2ccc7da15e Step 2/5 : ENV FRP_VERSION 0.24.1 ---> Running in 21d436e4d1e9 Removing intermediate container 21d436e4d1e9 ---> f9b71ed6adbb Step 3/5 : VOLUME [ “/sys/fs/cgroup” ] ---> Running in 7b4096dd4105 Removing intermediate container 7b4096dd4105 ---> 4067100e1239 Step 4/5 : RUN apk add --no-cache openrc && cd /root && wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz && tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz && cd frp_${FRP_VERSION}_linux_arm/ && cp frpc /usr/bin/ && mkdir -p /etc/frp && cp frpc.ini /etc/frp && cd /root && rm frp_${FRP_VERSION}_linux_arm.tar.gz && rm -rf frp_${FRP_VERSION}_linux_arm/ ---> Running in 78e4244651ee standard_init_linux.go:207: exec user process caused "exec format error" The command '/bin/sh -c apk add --no-cache openrc && cd /root && wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz && tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz && cd frp_${FRP_VERSION}_linux_arm/ && cp frpc /usr/bin/ && mkdir -p /etc/frp && cp frpc.ini /etc/frp && cd /root && rm frp_${FRP_VERSION}_linux_arm.tar.gz && rm -rf frp_${FRP_VERSION}_linux_arm/' returned a non-zero code: 1 ```
Author
Owner

@wmysh commented on GitHub (Jul 8, 2019):

试试这个?

FROM arm32v7/alpine

ENV FRP_VERSION 0.27.0

RUN wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz \
    &&  tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz  \
    &&  cp frp_${FRP_VERSION}_linux_arm/frpc* /usr/bin/ \
    &&  mkdir -p /etc/frp \
    &&  rm frp_${FRP_VERSION}_linux_arm.tar.gz \
    &&  rm -rf frp_${FRP_VERSION}_linux_arm/ 

VOLUME /etc/frp

ENTRYPOINT /usr/bin/frpc -c /etc/frp/frpc.ini
<!-- gh-comment-id:509131941 --> @wmysh commented on GitHub (Jul 8, 2019): 试试这个? ``` FROM arm32v7/alpine ENV FRP_VERSION 0.27.0 RUN wget -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_arm.tar.gz \ && tar zxvf frp_${FRP_VERSION}_linux_arm.tar.gz \ && cp frp_${FRP_VERSION}_linux_arm/frpc* /usr/bin/ \ && mkdir -p /etc/frp \ && rm frp_${FRP_VERSION}_linux_arm.tar.gz \ && rm -rf frp_${FRP_VERSION}_linux_arm/ VOLUME /etc/frp ENTRYPOINT /usr/bin/frpc -c /etc/frp/frpc.ini ```
Author
Owner

@chendachao commented on GitHub (Jul 8, 2019):

同样的问题,你可以在本地试一下

<!-- gh-comment-id:509137803 --> @chendachao commented on GitHub (Jul 8, 2019): 同样的问题,你可以在本地试一下
Author
Owner

@vritser commented on GitHub (Jul 8, 2019):

可以使用我的镜像: vritser/frpc:arm64

<!-- gh-comment-id:509147879 --> @vritser commented on GitHub (Jul 8, 2019): 可以使用我的镜像: vritser/frpc:arm64
Author
Owner

@chendachao commented on GitHub (Jul 8, 2019):

@vritser, 同样的问题:

$ docker logs frpc
standard_init_linux.go:211: exec user process caused "exec format error"
<!-- gh-comment-id:509178590 --> @chendachao commented on GitHub (Jul 8, 2019): @vritser, 同样的问题: ``` $ docker logs frpc standard_init_linux.go:211: exec user process caused "exec format error" ```
Author
Owner

@vritser commented on GitHub (Jul 8, 2019):

@chendachao 建议拷贝一份 Dockerfile 自己调试,我家里的树莓派都是 arm64v8 的

<!-- gh-comment-id:509189609 --> @vritser commented on GitHub (Jul 8, 2019): @chendachao 建议拷贝一份 Dockerfile 自己调试,我家里的树莓派都是 arm64v8 的
Author
Owner

@chendachao commented on GitHub (Jul 8, 2019):

@vritser, 多谢,我调试了很多,明天安装ubuntu mate试试

<!-- gh-comment-id:509190487 --> @chendachao commented on GitHub (Jul 8, 2019): @vritser, 多谢,我调试了很多,明天安装ubuntu mate试试
Author
Owner

@chendachao commented on GitHub (Jul 10, 2019):

安装了ubuntu mate和ubuntu core,都是同样的问题,docker基础镜像我选择了ubuntu 18.04

<!-- gh-comment-id:509863552 --> @chendachao commented on GitHub (Jul 10, 2019): 安装了ubuntu mate和ubuntu core,都是同样的问题,docker基础镜像我选择了ubuntu 18.04
Author
Owner

@status301 commented on GitHub (Jul 10, 2019):

[root@HK frpc_docker]# ll
total 3408
-rw-r--r-- 1 root root      46 May 25 23:17 Dockerfile
-rwxr-xr-x 1 root root 3479760 Apr 28 22:50 frpc
-rw-r--r-- 1 root root    1962 Apr 26 22:42 frpc.ini

[root@HK frpc_docker]# cat Dockerfile
FROM scratch
ADD ./frpc /
ENTRYPOINT ["frpc"]
[root@HK frpc_docker]#

#docker run -d --name=frpc --restart=always -v /root:/root frpc -c /root/frpc.ini

<!-- gh-comment-id:509942808 --> @status301 commented on GitHub (Jul 10, 2019): ``` [root@HK frpc_docker]# ll total 3408 -rw-r--r-- 1 root root 46 May 25 23:17 Dockerfile -rwxr-xr-x 1 root root 3479760 Apr 28 22:50 frpc -rw-r--r-- 1 root root 1962 Apr 26 22:42 frpc.ini [root@HK frpc_docker]# cat Dockerfile FROM scratch ADD ./frpc / ENTRYPOINT ["frpc"] [root@HK frpc_docker]# #docker run -d --name=frpc --restart=always -v /root:/root frpc -c /root/frpc.ini ```
Author
Owner

@snowdream commented on GitHub (Jul 14, 2019):

@chendachao snowdreamtech/frpc 是我构建的,目前只支持linux x64的CPU 架构。
树莓派3B+ 应该是arm架构,所以会出现standard_init_linux.go:211: exec user process caused "exec format error"

snowdreamtech/frpc
snowdreamtech/frps
是基于alpine和frp构建的,特点就是安装包小。
源码:https://github.com/snowdreamtech/frp

正在学习如何打包多CPU架构的docker。
有熟悉怎么打包的麻烦介绍一下。

<!-- gh-comment-id:511207439 --> @snowdream commented on GitHub (Jul 14, 2019): @chendachao snowdreamtech/frpc 是我构建的,目前只支持linux x64的CPU 架构。 树莓派3B+ 应该是arm架构,所以会出现standard_init_linux.go:211: exec user process caused "exec format error" snowdreamtech/frpc snowdreamtech/frps 是基于alpine和frp构建的,特点就是安装包小。 源码:https://github.com/snowdreamtech/frp 正在学习如何打包多CPU架构的docker。 有熟悉怎么打包的麻烦介绍一下。
Author
Owner

@jinmiaoluo commented on GitHub (Jul 17, 2019):

我打包了 arm, arm64, i386, x86_64 的多平台镜像. 通过 manifest list 实现. Docker 会自动根据平台拉取对应的真实镜像. 地址如下:
frpc: https://hub.docker.com/r/jinmiaoluo/frpc
frps: https://hub.docker.com/r/jinmiaoluo/frps

<!-- gh-comment-id:512115047 --> @jinmiaoluo commented on GitHub (Jul 17, 2019): 我打包了 arm, arm64, i386, x86_64 的多平台镜像. 通过 manifest list 实现. Docker 会自动根据平台拉取对应的真实镜像. 地址如下: frpc: https://hub.docker.com/r/jinmiaoluo/frpc frps: https://hub.docker.com/r/jinmiaoluo/frps
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1036
No description provided.