From 4a5ae9e81d1aff40eeb58c113afe27b3d86ad065 Mon Sep 17 00:00:00 2001 From: Ahmed Abdeazim <34234821+ahmed-abdelazim@users.noreply.github.com> Date: Mon, 22 May 2023 13:59:24 +0300 Subject: [PATCH] Update Dockerfile fix build issue. Remove bad build script from glide --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ed6884d..6b12861c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ -FROM golang:alpine as builder +FROM golang:alpine as builder -RUN apk --no-cache add curl git make perl -RUN curl -s https://glide.sh/get | sh +RUN apk --no-cache add curl git make perl unzip +RUN wget "https://github.com/Masterminds/glide/releases/download/v0.13.3/glide-v0.13.3-linux-amd64.zip" && \ + unzip glide-v0.13.3-linux-amd64.zip && \ + mv linux-amd64/glide /usr/bin COPY . /go/src/github.com/dcu/mongodb_exporter +RUN go env -w GO111MODULE=off RUN cd /go/src/github.com/dcu/mongodb_exporter && make release FROM alpine:3.4 -MAINTAINER David Cuadrado EXPOSE 9001 RUN apk add --update ca-certificates