Replace go.rice with native go embedding

This commit is contained in:
ByteDream 2023-02-21 22:40:49 +01:00
parent aadf099f50
commit 5c3f8e84b0
10 changed files with 59 additions and 67 deletions

View file

@ -42,10 +42,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
@ -53,8 +49,7 @@ COPY . /build
RUN cp -r /build/custom/ assets/
# Build
RUN rice embed-go && \
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o wg-ui .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o wg-ui .
# Release stage
FROM alpine:3.16