Skip to content

Commit

Permalink
Merge pull request v2fly#17 from mzz2017/master
Browse files Browse the repository at this point in the history
reorganize files and correct asset location according to fhs-install-v2ray
  • Loading branch information
kslr committed Oct 15, 2020
2 parents 390db4d + db8544d commit 3f82050
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 45 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:

- name: Build Target
run: |
cp ReleaseTag DockerHub
cd DockerHub
chmod +x v2ray.sh
./v2ray.sh
Expand All @@ -43,19 +41,17 @@ jobs:

- name: Build latest
run: |
cd DockerHub
docker buildx build --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--output "type=image,push=true" \
--tag "${{ secrets.DOCKER_USERNAME }}/v2fly-core:latest" \
--file Dockerfile.multi .
--file Dockerfile .
- name: Build tag
run: |
cd DockerHub
docker buildx build --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \
--output "type=image,push=true" \
--tag "${{ secrets.DOCKER_USERNAME }}/v2fly-core:${{ env.TAG }}" \
--file Dockerfile.multi .
--file Dockerfile .
test:
needs: build
Expand Down
19 changes: 0 additions & 19 deletions DockerHub/Dockerfile.multi

This file was deleted.

38 changes: 18 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
############################
# STEP 1 build executable binary
############################
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git bash wget curl
WORKDIR /go/src/v2ray.com/core
RUN git clone --progress https://github.com/v2fly/v2ray-core.git . && \
bash ./release/user-package.sh nosource noconf codename=$(git describe --tags) buildname=docker-fly abpathtgz=/tmp/v2ray.tgz
############################
# STEP 2 build a small image
############################
FROM alpine
FROM alpine:latest
LABEL maintainer "V2Fly Community <dev@v2fly.org>"

LABEL maintainer "V2Fly Community <vcptr@v2fly.org>"
COPY --from=builder /tmp/v2ray.tgz /tmp
RUN apk update && apk add ca-certificates && \
mkdir -p /usr/bin/v2ray && \
tar xvfz /tmp/v2ray.tgz -C /usr/bin/v2ray
WORKDIR /root
ARG TARGETVARIANT
ARG TARGETARCH
COPY v2ray-${TARGETARCH}${TARGETVARIANT}.tar.gz /usr/bin/v2ray.tar.gz
RUN mkdir -p /usr/local/share/v2ray
COPY geoip.dat /usr/local/share/v2ray/geoip.dat
COPY geosite.dat /usr/local/share/v2ray/geosite.dat
COPY config.json /etc/v2ray/config.json

#ENTRYPOINT ["/usr/bin/v2ray/v2ray"]
ENV PATH /usr/bin/v2ray:$PATH
CMD ["v2ray", "-config=/etc/v2ray/config.json"]
RUN set -ex \
&& apk add --no-cache tzdata ca-certificates \
&& mkdir -p /etc/v2ray/ /var/log/v2ray \
&& tar -zxvf /usr/bin/v2ray.tar.gz -C /usr/bin \
&& rm -fv /usr/bin/v2ray.tar.gz

VOLUME /etc/v2ray
CMD [ "/usr/bin/v2ray", "-config", "/etc/v2ray/config.json" ]
File renamed without changes.

0 comments on commit 3f82050

Please sign in to comment.