Skip to content

Commit

Permalink
Merge pull request #228 from sir-gon/develop
Browse files Browse the repository at this point in the history
[REFACTOR] [CONFIG] Dockerfile optimizations
  • Loading branch information
sir-gon authored Sep 7, 2024
2 parents 81d3fcd + 35d180f commit 688d890
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 @@ -24,15 +24,19 @@ FROM base AS lint
ENV WORKDIR=/app
WORKDIR ${WORKDIR}

RUN apk add --update --no-cache make nodejs npm wget
RUN apk add --update --no-cache yamllint
RUN apk add --update --no-cache make nodejs npm wget \
&& apk add --update --no-cache yamllint \
&& npm install -g --ignore-scripts markdownlint-cli

RUN npm install -g --ignore-scripts markdownlint-cli
ADD https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh ${WORKDIR}/
RUN sh install.sh -b $(go env GOPATH)/bin v1.60.3 \
&& rm install.sh \
&& golangci-lint --version

# golangci-lint
RUN wget --secure-protocol=TLSv1_2 --max-redirect=0 -O- -nv \
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b $(go env GOPATH)/bin v1.60.3
# RUN wget --secure-protocol=TLSv1_2 --max-redirect=0 -O- -nv \
# https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
# sh -s -- -b $(go env GOPATH)/bin v1.60.3

# [!TIP] Use a bind-mount to "/app" to override following "copys"
# for lint and test against "current" sources in this stage
Expand Down Expand Up @@ -98,10 +102,9 @@ RUN adduser \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"

RUN make build
RUN ls -alh
"${USER}" \
&& make build \
&& ls -alh

# CMD []

Expand Down

0 comments on commit 688d890

Please sign in to comment.