1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-23 02:26:49 -05:00
v2fly/release/container/Containerfile
Seena Fallah e738e05da3
build: set v2ray binary as an entrypoint
Use command to add args.
Also, add a default command to make it backward compatible with v4.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2023-05-29 00:10:05 +01:00

21 lines
620 B
Docker

FROM docker.io/library/golang@sha256:d19ee8512191c8b8e967246d4a7d0de4f4133a30bd9ce982e9b70a0c596dbf18 AS builder
FROM --platform=${TARGETPLATFORM} scratch
ARG TARGETPLATFORM
ARG VARIANT
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
COPY --from=builder /tmp /tmp
COPY --from=builder /dev /dev
ENV v2ray.location.asset=/opt/v2ray/share
COPY ./ /opt/v2ray/
ENTRYPOINT [ "/opt/v2ray/bin/v2ray" ]
CMD [ "run", "-config", "/etc/v2ray/config.json" ]