controlplane: refactor directories for servers

This commit is contained in:
singchia
2024-03-08 19:48:04 +08:00
parent 3241672e0a
commit ab59ece219
16 changed files with 465 additions and 108 deletions

View File

@@ -3,7 +3,6 @@ FROM golang:1.18-alpine
# Install curl and unzip, which are required to add protoc.
RUN apk add --no-cache curl unzip protoc protobuf-dev
# Add protoc extends
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest \
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest \
&& go install github.com/go-kratos/kratos/cmd/kratos/v2@latest \

View File

@@ -0,0 +1,28 @@
FROM golang:1.22.0 AS builder
# an automatic platform ARG enabled by Docker BuildKit.
ARG TARGETOS
# an automatic platform ARG enabled by Docker BuildKit.
ARG TARGETARCH
ENV GO111MODULE=on \
GOPROXY=https://goproxy.io
WORKDIR /go/src/github.com/singchia/frontier
RUN --mount=type=bind,readwrite,target=/go/src/github.com/singchia/frontier \
make DESTDIR=/tmp/install all install
FROM alpine:3.14
COPY --from=builder /tmp/install/ /
RUN apk --no-cache add ca-certificates wget
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-2.34-r0.apk
RUN apk add glibc-2.34-r0.apk
EXPOSE 2431
EXPOSE 2432
ENTRYPOINT ["/usr/bin/frontier"]
CMD ["--config", "/usr/conf/config.yaml"]