mirror of
https://github.com/alireza0/x-ui.git
synced 2026-06-27 19:20:49 +00:00
Some checks are pending
Release X-UI / build (386) (push) Waiting to run
Release X-UI / build (amd64) (push) Waiting to run
Release X-UI / build (arm64) (push) Waiting to run
Release X-UI / build (armv5) (push) Waiting to run
Release X-UI / build (armv6) (push) Waiting to run
Release X-UI / build (armv7) (push) Waiting to run
Release X-UI / build (s390x) (push) Waiting to run
Release X-UI / Build for Windows (push) Waiting to run
21 lines
527 B
Docker
21 lines
527 B
Docker
FROM golang:1.26-alpine AS builder
|
|
WORKDIR /app
|
|
ARG TARGETARCH
|
|
RUN apk --no-cache --update add build-base gcc wget unzip
|
|
COPY . .
|
|
ENV CGO_ENABLED=1
|
|
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
|
|
RUN go build -ldflags "-w -s" -o build/x-ui main.go
|
|
RUN ./DockerInitFiles.sh "$TARGETARCH"
|
|
|
|
FROM alpine
|
|
LABEL org.opencontainers.image.authors="alireza7@gmail.com"
|
|
ENV TZ=Asia/Tehran
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata libcap nftables
|
|
|
|
COPY --from=builder /app/build/ /app/
|
|
|
|
VOLUME [ "/etc/x-ui" ]
|
|
CMD [ "./x-ui" ]
|