add docker support

This commit is contained in:
yoan 2024-08-28 00:37:08 +08:00
parent 382b41bae8
commit ec25d092d7
3 changed files with 7 additions and 10 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
vendor
ui/node_modules
pb_data
build
.vscode

View File

@ -1,17 +1,8 @@
FROM node:20-alpine as build-ui
WORKDIR /app
COPY ../. /app/
RUN npm --prefix=./ui ci && npm --prefix=./ui run build
FROM golang:1.22-alpine FROM golang:1.22-alpine
WORKDIR /app WORKDIR /app
COPY ../. /app/ COPY ../. /app/
COPY --from=build-ui /app/ui/dist /app/ui/
RUN go build -o certimate RUN go build -o certimate

3
go.mod
View File

@ -18,6 +18,8 @@ require (
golang.org/x/crypto v0.26.0 golang.org/x/crypto v0.26.0
) )
require github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
require ( require (
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
@ -78,7 +80,6 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect