Dockerfile

This commit is contained in:
Alexander Kiryukhin 2022-05-02 14:09:37 +03:00
parent cc3ae00bbb
commit 5a168928ea
No known key found for this signature in database
GPG key ID: 6DF7A2910D0699E9
3 changed files with 37 additions and 0 deletions

19
Dockerfile Normal file
View file

@ -0,0 +1,19 @@
FROM golang:1.18 as builder
WORKDIR /usr/src
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go build -a -installsuffix cgo -o service .
FROM alpine
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
ca-certificates \
&& update-ca-certificates 2>/dev/null || true
WORKDIR /usr/app
COPY --from=builder /usr/src/service .
COPY static .
COPY tpl .
CMD ["./service"]

View file

@ -13,6 +13,24 @@
"vcs": "git", "vcs": "git",
"repo": "https://github.com/neonxp/jsonrpc2", "repo": "https://github.com/neonxp/jsonrpc2",
"desc": "Имплементация сервера JSON-RPC 2.0 с генериками." "desc": "Имплементация сервера JSON-RPC 2.0 с генериками."
},
"collection": {
"pkg": "collection",
"vcs": "git",
"repo": "https://github.com/neonxp/collection",
"desc": "Коллекция методов для работы с коллекциями"
},
"cluster": {
"pkg": "cluster",
"vcs": "git",
"repo": "https://github.com/neonxp/go-cluster",
"desc": "p2p cluster"
},
"extra": {
"pkg": "extra",
"vcs": "git",
"repo": "https://github.com/neonxp/extra",
"desc": "Пакет с разными полезными функциями без дополнительных зависимостей."
} }
} }
} }

BIN
pkg

Binary file not shown.