Skip to content

Conversation

@ngc7331
Copy link
Contributor

@ngc7331 ngc7331 commented Nov 24, 2024

Add riscv64 to docker build.

Tested build with the following command successfully:

$ export version=2.2.6.2
$ sed -i "s|Realv2rayAVersion|$version|g" install/docker/docker_helper.sh
$ docker build -t ngc7331/v2raya:latest --platform linux/riscv64 -f install/docker/Dockerfile.Action --push .

Image: https://hub.docker.com/repository/docker/ngc7331/v2raya/tags

Tested on a Milk-V Mars board and everything works fine:

$ neofetch
       _,met$$$$$gg.          user@MarsCM 
    ,g$$$$$$$$$$$$$$$P.       ------------ 
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux trixie/sid riscv64 
 ,$$P'              `$$$.     Host: Milk-V Mars CM eMMC 
',$$P       ,ggs.     `$$b:   Kernel: 5.15.0-xu.2 
`d$$'     ,$P"'   .    $$$    Uptime: 10 mins 
 $$P      d$'     ,    $$P    Packages: 1251 (dpkg) 
 $$:      $$.   -    ,d$$'    Shell: zsh 5.9 
 $$;      Y$b._   _,d$P'      Terminal: /dev/pts/0 
 Y$$.    `.`"Y$$$$P"'         CPU: (4) @ 1.500GHz 
 `$$b      "-.__              Memory: 304MiB / 3866MiB 
  `Y$$
   `Y$$.                                              
     `$$b.                                            
       `Y$$b.
          `"Y$b._
              `"""

$ docker run -d \              
  -p 2017:2017 \
  -p 20170-20172:20170-20172 \
  --restart=always \
  --name v2raya \
  -e V2RAYA_V2RAY_BIN=/usr/local/bin/xray \ 
  -v /etc/v2raya:/etc/v2raya \
  ngc7331/v2raya
05f46ee19e50977af570ee442318112a19146e1e0b4514da76cad8aaa0f410f6

$ docker logs v2raya
2024/11/24 07:14:57.620 [A] [main.go:29]  V2Ray binary is /usr/local/bin/xray
2024/11/24 07:14:57.621 [A] [main.go:29]  V2Ray asset directory is /run/user/0/v2raya
2024/11/24 07:14:57.621 [A] [main.go:29]  v2rayA working directory is /
2024/11/24 07:14:57.621 [A] [main.go:29]  v2rayA configuration directory is /etc/v2raya
2024/11/24 07:14:57.621 [A] [main.go:29]  Golang: go1.23.2
2024/11/24 07:14:57.621 [A] [main.go:29]  OS: linux
2024/11/24 07:14:57.621 [A] [main.go:29]  Arch: riscv64
2024/11/24 07:14:57.622 [A] [main.go:29]  Lite: false
2024/11/24 07:14:57.622 [A] [main.go:29]  Version: 2.2.6.2
2024/11/24 07:14:57.622 [A] [main.go:29]  Starting...
2024/11/24 07:14:57.622 [I] [main.go:30]  the core was not running the last time v2rayA exited
2024/11/24 07:14:57.652 [A] [index.go:116]  v2rayA is listening at http://127.0.0.1:2017
2024/11/24 07:14:57.652 [A] [index.go:116]  v2rayA is listening at http://172.17.0.3:2017
2024/11/24 07:14:57.652 [A] [index.go:116]  v2rayA is listening at http://[::1]:2017

Unfortunately, v2raya-gui is currently unable to add riscv64 support, as the base image nginx has not yet merged riscv64 support: nginx/docker-nginx#898. Unless we use alpine as the base image and install nginx manually, which is too much work.

@ngc7331
Copy link
Contributor Author

ngc7331 commented Nov 24, 2024

CI is failing because node-version: lts/* points to node22 now, not node20 (3 weeks ago). Maybe dependencies need upgrade?

@MarksonHon
Copy link
Contributor

CI failed is not a big problem, I have fixed it.

@MarksonHon MarksonHon merged commit c45063a into v2rayA:main Nov 24, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants