forked from meshery-extensions/meshery-nsm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (20 loc) · 739 Bytes
/
Dockerfile
File metadata and controls
23 lines (20 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM golang:1.12.5 as bd
RUN adduser --disabled-login appuser
WORKDIR /github.com/layer5io/meshery-nsm
ADD . .
RUN cd cmd; go build -ldflags="-w -s" -a -o /meshery-nsm .
RUN find . -name "*.go" -type f -delete; mv nsm /
FROM alpine
RUN apk --update add ca-certificates
RUN apk add bash
RUN apk add openssl
RUN apk add --update -t deps curl \
&& curl -L https://storage.googleapis.com/kubernetes-release/release/v1.15.2/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
COPY --from=bd /meshery-nsm /app/
COPY --from=bd /nsm /app/nsm
COPY --from=bd /etc/passwd /etc/passwd
USER appuser
WORKDIR /app
CMD ./meshery-nsm