mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-06-06 22:00:09 +02:00
Build separate debug image. Switch from kaniko to buildah.
This commit is contained in:
@@ -3,17 +3,8 @@ steps:
|
|||||||
agents:
|
agents:
|
||||||
queue: default
|
queue: default
|
||||||
os: linux
|
os: linux
|
||||||
plugins:
|
commands:
|
||||||
- EmbarkStudios/k8s#1.1.0:
|
- buildah bud --layers -t embarkstudios/wireguard-ui:latest -f Dockerfile .
|
||||||
image: gcr.io/kaniko-project/executor:latest
|
- buildah bud --layers -t embarkstudios/wireguard-ui:debug -f Dockerfile.debug .
|
||||||
command:
|
- buildah push embarkstudios/wireguard-ui:latest
|
||||||
- --destination=embarkstudios/wireguard-ui
|
- buildah push embarkstudios/wireguard-ui:debug
|
||||||
- --context=/build
|
|
||||||
- --reproducible
|
|
||||||
- --cache=true
|
|
||||||
- --cache-repo=kaniko-cache.buildkite.svc.cluster.local/kaniko/cache
|
|
||||||
- --cache-dir=/cache
|
|
||||||
mount-secret:
|
|
||||||
- docker-hub-credentials:/kaniko/.docker
|
|
||||||
mount-hostpath:
|
|
||||||
- /mnt/disks/ssd0/cache/kaniko:/cache
|
|
||||||
|
|||||||
+4
-3
@@ -1,10 +1,11 @@
|
|||||||
FROM node:12-alpine AS ui
|
FROM node:12-alpine AS ui
|
||||||
WORKDIR /ui
|
WORKDIR /ui
|
||||||
COPY ui .
|
COPY package.json package-lock.json /ui/
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
COPY ui .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM golang:1.12 AS build
|
FROM golang:1.13 AS build
|
||||||
WORKDIR /wg
|
WORKDIR /wg
|
||||||
RUN go get github.com/go-bindata/go-bindata/... &&\
|
RUN go get github.com/go-bindata/go-bindata/... &&\
|
||||||
go get github.com/elazarl/go-bindata-assetfs/...
|
go get github.com/elazarl/go-bindata-assetfs/...
|
||||||
@@ -16,6 +17,6 @@ COPY --from=ui /ui/public ui/public
|
|||||||
RUN go-bindata-assetfs -prefix ui/public ui/public &&\
|
RUN go-bindata-assetfs -prefix ui/public ui/public &&\
|
||||||
go install .
|
go install .
|
||||||
|
|
||||||
FROM gcr.io/distroless/base:debug
|
FROM gcr.io/distroless/base
|
||||||
COPY --from=build /go/bin/wireguard-ui /
|
COPY --from=build /go/bin/wireguard-ui /
|
||||||
ENTRYPOINT [ "/wireguard-ui" ]
|
ENTRYPOINT [ "/wireguard-ui" ]
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
FROM embarkstudios/wireguard-ui AS latest
|
||||||
|
|
||||||
|
FROM ubuntu
|
||||||
|
RUN apt-get update -y && \
|
||||||
|
apt-get install -y software-properties-common iptables curl iproute2 ifupdown iputils-ping && \
|
||||||
|
echo resolvconf resolvconf/linkify-resolvconf boolean false | debconf-set-selections && \
|
||||||
|
echo "REPORT_ABSENT_SYMLINK=no" >> /etc/default/resolvconf && \
|
||||||
|
add-apt-repository --yes ppa:wireguard/wireguard && \
|
||||||
|
apt-get install resolvconf
|
||||||
|
RUN apt-get install -qy --no-install-recommends wireguard-tools
|
||||||
|
COPY --from=latest /wireguard-ui /
|
||||||
|
ENTRYPOINT [ "/wireguard-ui" ]
|
||||||
@@ -137,7 +137,7 @@ func (s *Server) initInterface() error {
|
|||||||
conn := nftables.Conn{NetNS: int(ns)}
|
conn := nftables.Conn{NetNS: int(ns)}
|
||||||
|
|
||||||
log.Debug("Flushing nftable rulesets")
|
log.Debug("Flushing nftable rulesets")
|
||||||
// conn.FlushRuleset()
|
conn.FlushRuleset()
|
||||||
|
|
||||||
log.Debug("Setting up nftable rules for ip masquerading")
|
log.Debug("Setting up nftable rules for ip masquerading")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user