mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-13 21:13:09 +00:00
18 lines
423 B
Docker
18 lines
423 B
Docker
FROM golang:1.20-alpine AS builder
|
|
WORKDIR /app
|
|
ARG TARGETARCH
|
|
RUN apk --no-cache --update add build-base gcc wget
|
|
COPY . .
|
|
RUN env CGO_ENABLED=1 go build 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 ca-certificates tzdata
|
|
|
|
COPY --from=builder /app/build/ /app/
|
|
VOLUME [ "/etc/x-ui" ]
|
|
CMD [ "./x-ui" ] |