From 5a168928ea451010b97d06be686b1a1a2141b31d Mon Sep 17 00:00:00 2001 From: Alexander Kiryukhin Date: Mon, 2 May 2022 14:09:37 +0300 Subject: Dockerfile --- Dockerfile | 19 +++++++++++++++++++ config.json | 18 ++++++++++++++++++ pkg | Bin 9901849 -> 0 bytes 3 files changed, 37 insertions(+) create mode 100644 Dockerfile delete mode 100755 pkg diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..efa35cb --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/config.json b/config.json index 5105fd1..31a1a28 100644 --- a/config.json +++ b/config.json @@ -13,6 +13,24 @@ "vcs": "git", "repo": "https://github.com/neonxp/jsonrpc2", "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": "Пакет с разными полезными функциями без дополнительных зависимостей." } } } diff --git a/pkg b/pkg deleted file mode 100755 index c4caa1b..0000000 Binary files a/pkg and /dev/null differ -- cgit v1.2.3