Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add initial version of registry-k8s #1

Merged
merged 2 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ FROM golang:1.15-buster as go
ENV GO111MODULE=on
ENV CGO_ENABLED=0
ENV GOBIN=/bin
RUN go get github.com/go-delve/delve/cmd/dlv@v1.4.0
RUN go run github.com/edwarnicke/dl \
https://github.com/spiffe/spire/releases/download/v0.9.3/spire-0.9.3-linux-x86_64-glibc.tar.gz | \
tar -xzvf - -C /bin --strip=3 ./spire-0.9.3/bin/spire-server ./spire-0.9.3/bin/spire-agent
RUN go get github.com/go-delve/delve/cmd/dlv@v1.5.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not 1.5.1?

RUN go get github.com/edwarnicke/dl
RUN dl https://github.com/spiffe/spire/releases/download/v0.11.1/spire-0.11.1-linux-x86_64-glibc.tar.gz | \
tar -xzvf - -C /bin --strip=3 ./spire-0.11.1/bin/spire-server ./spire-0.11.1/bin/spire-agent

FROM go as build
WORKDIR /build
COPY go.mod go.sum ./
COPY ./pkg/internal/imports ./pkg/internal/imports
RUN go build ./pkg/internal/imports
COPY . .
RUN go build -o /bin/app .
RUN go build -o /bin/cmd-registry-k8s .

FROM build as test
CMD go test -test.v ./...
Expand All @@ -19,5 +22,5 @@ FROM test as debug
CMD dlv -l :40000 --headless=true --api-version=2 test -test.v ./...

FROM alpine as runtime
COPY --from=build /bin/app /bin/app
CMD /bin/app
COPY --from=build /bin/cmd-registry-k8s /bin/cmd-registry-k8s
CMD /bin/cmd-registry-k8s
12 changes: 11 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
module github.com/networkservicemesh/cmd-template
module github.com/networkservicemesh/cmd-registry-k8s

go 1.15

require (
github.com/antonfisher/nested-logrus-formatter v1.3.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/networkservicemesh/sdk v0.0.0-20201209081426-89944c40ef4d
github.com/networkservicemesh/sdk-k8s v0.0.0-20201215144953-5c91828f35ea
github.com/sirupsen/logrus v1.7.0
github.com/spiffe/go-spiffe/v2 v2.0.0-beta.4
google.golang.org/grpc v1.34.0
)
Loading