mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-16 18:48:15 +03:00
Replace go.rice with native go embedding (#331)
This commit is contained in:
parent
e3e3639443
commit
4fc52b62d2
10 changed files with 60 additions and 70 deletions
|
@ -43,10 +43,6 @@ RUN mkdir -p assets/plugins && \
|
|||
/build/node_modules/jquery-tags-input/ \
|
||||
assets/plugins/
|
||||
|
||||
# Get go modules and build tool
|
||||
RUN go mod download && \
|
||||
go get github.com/GeertJohan/go.rice/rice
|
||||
|
||||
# Add sources
|
||||
COPY . /build
|
||||
|
||||
|
@ -54,8 +50,7 @@ COPY . /build
|
|||
RUN cp -r /build/custom/ assets/
|
||||
|
||||
# Build
|
||||
RUN rice embed-go && \
|
||||
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X main.gitCommit=${COMMIT}" -a -o wg-ui .
|
||||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X main.gitCommit=${COMMIT}" -a -o wg-ui .
|
||||
|
||||
# Release stage
|
||||
FROM alpine:3.16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue