-
Notifications
You must be signed in to change notification settings - Fork 2
/
dev.lint.Dockerfile
31 lines (24 loc) · 784 Bytes
/
dev.lint.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM golangci/golangci-lint:v1.38
# Meta data
LABEL maintainer="project_author_email"
LABEL description="project_description"
# Copying over files
COPY . /usr/src/app
WORKDIR /usr/src/app
# Installing hadolint:
WORKDIR /usr/bin
RUN curl -sL -o hadolint "https://github.com/hadolint/hadolint/releases/download/v1.17.6/hadolint-$(uname -s)-$(uname -m)" \
&& chmod 700 hadolint
# Installing goreleaser
WORKDIR /
RUN git clone https://github.com/goreleaser/goreleaser
WORKDIR /goreleaser
RUN go get ./... \
&& go build -o goreleaser . \
&& mv goreleaser /usr/bin
# Installing make
RUN apt-get update && apt-get install make=4.2.1-1.2 -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
CMD ["make", "local-lint"]