You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUN GOPROXY=https://proxy.golang.org GOSUMDB=off go build -ldflags="-w -s" -a -o /meshery-traefik-mesh .
5
-
RUN find . -name "*.go" -type f -delete
1
+
FROM golang:1.15 as builder
6
2
7
-
FROM alpine
8
-
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
9
-
RUN apk --update add ca-certificates
10
-
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
3
+
ARG CONFIG_PROVIDER="viper"
4
+
WORKDIR /build
5
+
# Copy the Go Modules manifests
6
+
COPY go.mod go.mod
7
+
COPY go.sum go.sum
8
+
# cache deps before building and copying source so that we don't need to re-download as much
9
+
# and so that source changes don't invalidate our downloaded layer
10
+
RUN go mod download
11
+
# Copy the go source
12
+
COPY main.go main.go
13
+
COPY internal/ internal/
14
+
COPY traefik/ traefik/
15
+
# Build
16
+
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-w -s -X main.provider=$CONFIG_PROVIDER" -a -o meshery-traefik-mesh main.go
0 commit comments