Skip to content

Commit

Permalink
Merge pull request #318 from Revolyssup/fix
Browse files Browse the repository at this point in the history
Fix failing container
  • Loading branch information
Revolyssup authored Oct 4, 2022
2 parents 3c92d08 + aae4ab6 commit 6221f42
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ COPY build/ build/

RUN GOPROXY=https://proxy.golang.org,direct CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-w -s -X main.version=$VERSION -X main.gitsha=$GIT_COMMITSHA" -a -o meshery-consul main.go

# 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/static:nonroot
ENV DISTRO="debian"
FROM alpine:3.15
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
RUN apk --update add ca-certificates && \
mkdir /lib64 && \
ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

USER appuser
ENV SERVICE_ADDR="meshery-consul"
ENV MESHERY_SERVER="http://meshery:9081"
WORKDIR $HOME/.meshery
RUN mkdir -p /home/appuser/.kube
RUN mkdir -p /home/appuser/.meshery
WORKDIR /home/appuser
COPY templates/ ./templates
COPY --from=builder /build/meshery-consul .
USER nonroot:nonroot

CMD ["./meshery-consul"]

COPY --from=builder /build/meshery-consul /home/appuser
COPY consul /home/appuser/consul
CMD ./meshery-consul

0 comments on commit 6221f42

Please sign in to comment.