x-ui icon indicating copy to clipboard operation
x-ui copied to clipboard

建议出一个使用docker-compose安装在docker运行的教程

Open lixingbu-tal opened this issue 1 year ago • 3 comments

Welcome

  • [X] Yes, I'm using the latest major release. Only such installations are supported.
  • [X] Yes, I'm using the supported system. Only such systems are supported.
  • [X] Yes, I have read all WIKI document,nothing can help me in my problem.
  • [X] Yes, I've searched similar issues on GitHub and didn't find any.
  • [X] Yes, I've included all information below (version, config, log, etc).

Description of the problem,screencshot would be good

建议出一个使用docker-compose安装在docker运行的教程

Version of x-ui

$ x-ui version
# Paste output here

x-ui log or xray log

# paste log here

lixingbu-tal avatar Apr 15 '23 15:04 lixingbu-tal

Dockerfile

FROM debian:11-slim
WORKDIR /root
RUN apt-get update \
    && apt-get install -y --no-install-recommends -y ca-certificates  wget \
    && apt-get clean \
    && wget -O - https://github.com/FranzKafkaYu/x-ui/releases/download/0.3.4.2/x-ui-linux-arm64.tar.gz | tar -zxf - -C /tmp \
    && mv /tmp/x-ui/bin/ /root/ \
    && mv /tmp/x-ui/x-ui /root/ \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /tmp/x-ui/ 
VOLUME [ "/etc/x-ui" ]
CMD [ "./x-ui" ]

docker-compose.yaml

version: "3.8"
services:
  xui:
    build: ./
    network_mode: "host"
    volumes:
    - ./data/db:/etc/x-ui
    restart: always

运行

docker compose up -d

bestmjj avatar Apr 28 '23 01:04 bestmjj

network_mode: "host" 网络模式可以是bridge 吗,我测试了好像不行

bigbighill avatar Aug 01 '23 14:08 bigbighill

Dockerfile

FROM debian:11-slim
WORKDIR /root
RUN apt-get update \
    && apt-get install -y --no-install-recommends -y ca-certificates  wget \
    && apt-get clean \
    && wget -O - https://github.com/FranzKafkaYu/x-ui/releases/download/0.3.4.2/x-ui-linux-arm64.tar.gz | tar -zxf - -C /tmp \
    && mv /tmp/x-ui/bin/ /root/ \
    && mv /tmp/x-ui/x-ui /root/ \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /tmp/x-ui/ 
VOLUME [ "/etc/x-ui" ]
CMD [ "./x-ui" ]

docker-compose.yaml

version: "3.8"
services:
  xui:
    build: ./
    network_mode: "host"
    volumes:
    - ./data/db:/etc/x-ui
    restart: always

运行

docker compose up -d

启动后要怎么使用?

issueok avatar Apr 09 '24 02:04 issueok