mirror of
				https://github.com/teddysun/across.git
				synced 2025-10-31 08:45:36 +08:00 
			
		
		
		
	Added multiple architectures Dockerfile
This commit is contained in:
		
							
								
								
									
										17
									
								
								docker/brook/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								docker/brook/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| # Dockerfile for Brook based alpine | ||||
| # Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com> | ||||
| # Reference URL: | ||||
| # https://github.com/txthinking/brook | ||||
|  | ||||
| FROM --platform=$TARGETPLATFORM golang:alpine as builder | ||||
| RUN set -ex && apk add --update git \ | ||||
| 	&& go get -u -v github.com/txthinking/brook/cli/brook | ||||
|  | ||||
| FROM --platform=$TARGETPLATFORM alpine:latest | ||||
| LABEL maintainer="Teddysun <i@teddysun.com>" | ||||
|  | ||||
| COPY --from=builder /go/bin/brook /usr/bin | ||||
|  | ||||
| ENV ARGS="server -l :9000 -p password0" | ||||
|  | ||||
| CMD brook $ARGS | ||||
							
								
								
									
										32
									
								
								docker/kms/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								docker/kms/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| # Dockerfile for KMS Server | ||||
| # Copyright (C) 2018 - 2020 Teddysun <i@teddysun.com> | ||||
| # Reference URL: | ||||
| # https://github.com/Wind4/vlmcsd | ||||
|  | ||||
| FROM --platform=$TARGETPLATFORM alpine:latest | ||||
| LABEL maintainer="Teddysun <i@teddysun.com>" | ||||
|  | ||||
| ENV KMS_RELEASE https://github.com/Wind4/vlmcsd/archive/master.zip | ||||
|  | ||||
| RUN runDeps="\ | ||||
| 		g++ \ | ||||
| 		gcc \ | ||||
| 		wget \ | ||||
| 		make \ | ||||
| 		unzip \ | ||||
| 	"; \ | ||||
| 	set -ex \ | ||||
| 	&& apk add --no-cache --virtual .build-deps ${runDeps} \ | ||||
| 	&& cd /tmp \ | ||||
| 	&& wget -O vlmcsd.zip ${KMS_RELEASE} \ | ||||
| 	&& unzip vlmcsd.zip \ | ||||
| 	&& cd vlmcsd-master \ | ||||
| 	&& make \ | ||||
| 	&& cp -p bin/vlmcsd /usr/bin/ \ | ||||
| 	&& chmod 755 /usr/bin/vlmcsd \ | ||||
| 	&& rm -rf /tmp/vlmcsd.zip /tmp/vlmcsd-master \ | ||||
| 	&& apk del .build-deps | ||||
|  | ||||
| EXPOSE 1688 | ||||
|  | ||||
| CMD [ "vlmcsd", "-D" ] | ||||
							
								
								
									
										20
									
								
								docker/l2tp/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								docker/l2tp/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| # Dockerfile for L2TP/IPSec VPN Server based alpine | ||||
| # Copyright (C) 2018 - 2020 Teddysun <i@teddysun.com> | ||||
|  | ||||
| FROM --platform=$TARGETPLATFORM alpine:edge | ||||
| LABEL maintainer="Teddysun <i@teddysun.com>" | ||||
|  | ||||
| RUN apk add -U ca-certificates openssl libreswan xl2tpd \ | ||||
| 	&& ipsec initnss \ | ||||
| 	&& rm -rf /var/cache/apk/* | ||||
|  | ||||
| COPY ipsec /etc/init.d/ipsec | ||||
| COPY l2tp.sh /usr/bin/l2tp | ||||
| COPY l2tpctl.sh /usr/bin/l2tpctl | ||||
| RUN chmod 755 /etc/init.d/ipsec /usr/bin/l2tp /usr/bin/l2tpctl | ||||
|  | ||||
| VOLUME /lib/modules | ||||
|  | ||||
| EXPOSE 500/udp 4500/udp | ||||
|  | ||||
| CMD [ "l2tp" ] | ||||
							
								
								
									
										41
									
								
								docker/v2ray/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								docker/v2ray/Dockerfile.architecture
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| # Dockerfile for v2ray based alpine | ||||
| # Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com> | ||||
| # Reference URL: | ||||
| # https://github.com/v2ray/v2ray-core | ||||
| # https://github.com/v2ray/geoip | ||||
| # https://github.com/v2ray/domain-list-community | ||||
|  | ||||
| FROM --platform=$TARGETPLATFORM golang:alpine AS builder | ||||
| RUN set -ex \ | ||||
| 	&& apk add --no-cache git unzip \ | ||||
| 	&& mkdir -p /go/src/github.com/v2ray \ | ||||
| 	&& cd /go/src/github.com/v2ray \ | ||||
| 	&& git clone https://github.com/v2ray/v2ray-core.git \ | ||||
| 	&& cd v2ray-core \ | ||||
| 	&& go get -d \ | ||||
| 	&& cd main \ | ||||
| 	&& go build -o /go/bin/v2ray \ | ||||
| 	&& cd ../infra/control/main \ | ||||
| 	&& go build -o /go/bin/v2ctl \ | ||||
| 	&& wget -O /go/bin/geosite.dat https://github.com/v2ray/domain-list-community/releases/latest/download/dlc.dat \ | ||||
| 	&& wget -O /go/bin/geoip.dat https://github.com/v2ray/geoip/releases/latest/download/geoip.dat | ||||
|  | ||||
| FROM --platform=$TARGETPLATFORM alpine:latest | ||||
| LABEL maintainer="Teddysun <i@teddysun.com>" | ||||
|  | ||||
| RUN set -ex \ | ||||
| 	&& apk add --no-cache tzdata ca-certificates \ | ||||
| 	&& rm -rf /var/cache/apk/* \ | ||||
| 	&& mkdir -p /etc/v2ray \ | ||||
| 	&& mkdir -p /var/log/v2ray | ||||
|  | ||||
| COPY --from=builder /go/bin/v2ray /usr/bin | ||||
| COPY --from=builder /go/bin/v2ctl /usr/bin | ||||
| COPY --from=builder /go/bin/geoip.dat /usr/bin | ||||
| COPY --from=builder /go/bin/geosite.dat /usr/bin | ||||
| COPY config.json /etc/v2ray/config.json | ||||
| VOLUME /etc/v2ray | ||||
|  | ||||
| ENV TZ=Asia/Shanghai | ||||
|  | ||||
| CMD [ "v2ray", "-config", "/etc/v2ray/config.json" ] | ||||
		Reference in New Issue
	
	Block a user