proxy: add docker image with mtr
This commit is contained in:
15
.github/workflows/release.yaml
vendored
15
.github/workflows/release.yaml
vendored
@@ -67,7 +67,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: '{{defaultContext}}:frontend'
|
context: '{{defaultContext}}:frontend'
|
||||||
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
||||||
push: true
|
push: true{context}/Dockerfile
|
||||||
tags: |
|
tags: |
|
||||||
xddxdd/bird-lg-go:latest
|
xddxdd/bird-lg-go:latest
|
||||||
xddxdd/bird-lg-go:${{ github.event.release.tag_name }}
|
xddxdd/bird-lg-go:${{ github.event.release.tag_name }}
|
||||||
@@ -85,3 +85,16 @@ jobs:
|
|||||||
xddxdd/bird-lgproxy-go:${{ github.event.release.tag_name }}
|
xddxdd/bird-lgproxy-go:${{ github.event.release.tag_name }}
|
||||||
ghcr.io/xddxdd/bird-lg-go:proxy
|
ghcr.io/xddxdd/bird-lg-go:proxy
|
||||||
ghcr.io/xddxdd/bird-lg-go:proxy-${{ github.event.release.tag_name }}
|
ghcr.io/xddxdd/bird-lg-go:proxy-${{ github.event.release.tag_name }}
|
||||||
|
|
||||||
|
- name: Build proxy docker image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: '{{defaultContext}}:proxy'
|
||||||
|
file: '{context}/Dockerfile.mtr'
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
xddxdd/bird-lgproxy-go:latest-mtr
|
||||||
|
xddxdd/bird-lgproxy-go:${{ github.event.release.tag_name }}-mtr
|
||||||
|
ghcr.io/xddxdd/bird-lg-go:proxy-mtr
|
||||||
|
ghcr.io/xddxdd/bird-lg-go:proxy-${{ github.event.release.tag_name }}-mtr
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -20,7 +20,3 @@ proxy/proxy
|
|||||||
|
|
||||||
# don't include generated bindata file
|
# don't include generated bindata file
|
||||||
frontend/bindata.go
|
frontend/bindata.go
|
||||||
|
|
||||||
# don't include generated Dockerfiles
|
|
||||||
frontend/Dockerfile.*
|
|
||||||
proxy/Dockerfile.*
|
|
||||||
31
proxy/Dockerfile.mtr
Normal file
31
proxy/Dockerfile.mtr
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM golang AS step_0
|
||||||
|
|
||||||
|
ENV CGO_ENABLED=0 GO111MODULE=on
|
||||||
|
WORKDIR /root
|
||||||
|
COPY . .
|
||||||
|
RUN go build -ldflags "-w -s" -o /proxy
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
FROM alpine:edge AS step_1
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
RUN apk add --no-cache build-base linux-headers
|
||||||
|
|
||||||
|
RUN wget https://www.bitwizard.nl/mtr/files/mtr-0.94.tar.gz \
|
||||||
|
-O mtr-0.94.tar.gz
|
||||||
|
RUN tar xvf mtr-0.94.tar.gz \
|
||||||
|
&& cd mtr-0.94 \
|
||||||
|
&& ./configure --without-gtk --without-ncurses --without-jansson --without-ipinfo --disable-bash-completion \
|
||||||
|
&& make -j4 LDFLAGS="-static" \
|
||||||
|
&& strip /root/mtr-0.94/mtr \
|
||||||
|
&& strip /root/mtr-0.94/mtr-packet
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
FROM scratch AS step_2
|
||||||
|
ENV PATH=/
|
||||||
|
COPY --from=step_0 /proxy /
|
||||||
|
COPY --from=step_1 /root/mtr-0.94/mtr /
|
||||||
|
COPY --from=step_1 /root/mtr-0.94/mtr-packet /
|
||||||
|
ENTRYPOINT ["/proxy"]
|
||||||
Reference in New Issue
Block a user