-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathDockerfile
68 lines (54 loc) · 1.76 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM ubuntu:latest as builder
RUN apt-get update
RUN apt-get install curl -y
RUN curl -L -o /tmp/go.sh https://install.direct/go.sh
RUN chmod +x /tmp/go.sh
RUN /tmp/go.sh
FROM alpine:3.11
LABEL Maintainer="George Zhou<[email protected] >" \
Description="V2Ray all-in-one image with ws-tls option based on Alpine Linux." \
Language="HTML" \
OS="Alpine Linux" \
Service="V2Ray" \
Content="V2RAY and Nginx server"
ENV LISTENING_PORT 3456
ENV CLIENT_ID "2e5762cc-20d2-42b1-b0ad-cbe55dc5fa35"
ENV CLIENT_ALTERID 64
ENV CLIENT_WSPATH "/allproducts"
#ENV VER=4.23.1
ENV PATH /usr/bin/v2ray:$PATH
# ensure www-data user exists
RUN set -eux; \
addgroup -g 82 -S www-data; \
adduser -u 82 -D -S -G www-data www-data;
# 82 is the standard uid/gid for "www-data" in Alpine
#install v2ray
COPY --from=builder /usr/bin/v2ray/v2ray /usr/bin/v2ray/
COPY --from=builder /usr/bin/v2ray/v2ctl /usr/bin/v2ray/
COPY docker-conf/config.json /etc/v2ray/config.json
RUN set -ex && \
apk update && \
apk --no-cache add ca-certificates \
nginx \
supervisor && \
rm -rf /var/cache/apk/* && \
mkdir /var/log/v2ray/ &&\
chmod +x /usr/bin/v2ray/v2ctl && \
chmod +x /usr/bin/v2ray/v2ray
RUN rm -rf /etc/localtime
COPY docker-conf/localtime /etc/
# configure Nginx
COPY docker-conf/nginx.conf /etc/nginx/
COPY docker-conf/default.conf /etc/nginx/conf.d/
# configure supervisord
COPY docker-conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# web content volume
VOLUME /var/www/html
WORKDIR /var/www/html
COPY docker-conf/html/* /var/www/html/
RUN chown -R www-data.www-data /var/www
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
EXPOSE 80
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]