generated from meshery/meshery-istio
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from Shreyas220/test
Reworking of App-Mesh adapter
- Loading branch information
Showing
25 changed files
with
2,295 additions
and
2,320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,34 @@ | ||
FROM golang:1.12.8 as bd | ||
RUN adduser --disabled-login appuser | ||
WORKDIR /github.com/layer5io/meshery-app-mesh | ||
ADD . . | ||
RUN cd cmd; go build -ldflags="-w -s" -a -o /meshery-app-mesh . | ||
RUN find . -name "*.go" -type f -delete; mv app-mesh / | ||
FROM golang:1.16.0 as builder | ||
|
||
FROM alpine | ||
RUN apk --update add ca-certificates | ||
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 | ||
COPY --from=bd /meshery-app-mesh /app/ | ||
COPY --from=bd /app-mesh /app/app-mesh | ||
COPY --from=bd /etc/passwd /etc/passwd | ||
USER appuser | ||
WORKDIR /app | ||
CMD ./meshery-app-mesh | ||
ARG VERSION | ||
ARG GIT_COMMITSHA | ||
WORKDIR /build | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
# Copy the go source | ||
COPY main.go main.go | ||
COPY internal/ internal/ | ||
COPY app_mesh/ app_mesh/ | ||
# Build | ||
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-w -s -X main.version=$VERSION -X main.gitsha=$GIT_COMMITSHA" -a -o meshery-app-mesh main.go | ||
|
||
FROM alpine:3.14 as jsonschema-util | ||
RUN apk add --no-cache curl | ||
WORKDIR / | ||
RUN curl -LO https://github.com/layer5io/kubeopenapi-jsonschema/releases/download/v0.1.0/kubeopenapi-jsonschema | ||
RUN chmod +x /kubeopenapi-jsonschema | ||
|
||
# Use distroless as minimal base image to package the manager binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/base | ||
WORKDIR / | ||
ENV DISTRO="debian" | ||
ENV GOARCH="amd64" | ||
ENV SERVICE_ADDR="meshery-app-mesh" | ||
ENV MESHERY_SERVER="http://meshery:9081" | ||
COPY --from=builder /build/meshery-app-mesh . | ||
ENTRYPOINT ["/meshery-app-mesh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.