mirror of
https://github.com/alireza0/x-ui.git
synced 2026-10-21 03:01:51 +00:00
Some checks failed
Release X-UI / build (386) (push) Has been cancelled
Release X-UI / build (amd64) (push) Has been cancelled
Release X-UI / build (arm64) (push) Has been cancelled
Release X-UI / build (armv5) (push) Has been cancelled
Release X-UI / build (armv6) (push) Has been cancelled
Release X-UI / build (armv7) (push) Has been cancelled
Release X-UI / build (s390x) (push) Has been cancelled
Release X-UI / Build for Windows (push) Has been cancelled
Test / test (push) Has been cancelled
Release X-UI / Docker image (push) Has been cancelled
22 lines
558 B
Docker
22 lines
558 B
Docker
FROM golang:1.27-alpine AS builder
|
|
WORKDIR /app
|
|
ARG TARGETARCH
|
|
ARG TARGETVARIANT
|
|
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$TARGETVARIANT"
|
|
|
|
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" ]
|