Based on alpine:3.15.0 mirror build v2ray-v4.43.0
125
# Base image
FROM alpine:3.15.0
# Image creator
MAINTAINER imocence
# Set the system coding
ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 TZ=Asia/Shanghai
WORKDIR /home/v2ray
COPY v2ray_entrypoint.sh /home/v2ray
RUN echo -e 'http://mirrors.aliyun.com/alpine/v3.15/main/\nhttp://mirrors.aliyun.com/alpine/v3.15/community/' > /etc/apk/repositories \
&& apk add -U tzdata v2ray && ln -s /usr/share/zoneinfo/${TZ} /etc/localtime && rm -rf /var/cache/apk/* /tmp/* \
&& sed -i 's@// "access":@"access":@' /etc/v2ray/config.json && sed -i 's@// "error":@"error":@' /etc/v2ray/config.json \
&& sed -i 's@/path/to/access/log/file@/home/v2ray/logs/access.log@' /etc/v2ray/config.json \
&& sed -i 's@/path/to/error/log/file@/home/v2ray/logs/error.log@' /etc/v2ray/config.json \
&& mkdir /conf /logs && chmod +x /home/v2ray/v2ray_entrypoint.sh
ENV PATH=/usr/bin/v2ray/:$PATH
EXPOSE 1080
VOLUME ["/home/v2ray/conf","/home/v2ray/logs"]
ENTRYPOINT ["/home/v2ray/v2ray_entrypoint.sh"]
version: '2'
services:
web:
image: imocence/v2ray-alpine:v4.43.0
container_name: v2ray
network_mode: bridge
ports:
- "0.0.0.0:1080:1080"
volumes:
- ./conf:/home/v2ray/conf
- ./logs:/home/v2ray/logs
restart: unless-stopped
Content type
Image
Digest
sha256:83453d3a8…
Size
16.7 MB
Last updated
about 4 years ago
docker pull imocence/v2ray-alpine:v4.43.0