Skip to content

Commit 30bb2b5

Browse files
author
Gonzalo Diaz
committed
[FIX] Sonarlint fixes for Dockerfile: "Merge this RUN instruction with the consecutive ones."
1 parent b7c5a5b commit 30bb2b5

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ FROM base AS lint
2222
ENV WORKDIR=/app
2323
WORKDIR ${WORKDIR}
2424

25-
RUN apk add --update --no-cache make nodejs npm
26-
RUN apk add --update --no-cache yamllint
27-
28-
RUN npm install -g --ignore-scripts markdownlint-cli
25+
RUN apk add --update --no-cache make nodejs npm \
26+
&& apk add --update --no-cache yamllint \
27+
&& npm install -g --ignore-scripts markdownlint-cli
2928

3029
# [!TIP] Use a bind-mount to "/app" to override following "copys"
3130
# for lint and test against "current" sources in this stage
@@ -74,11 +73,11 @@ RUN ls -alh
7473
###############################################################################
7574
FROM development AS builder
7675

76+
RUN apk add --update --no-cache rsync
77+
7778
ENV WORKDIR=/app
7879
WORKDIR ${WORKDIR}
7980

80-
RUN apk add --update --no-cache rsync
81-
8281
RUN rsync -av --prune-empty-dirs \
8382
--exclude '*_test.py' \
8483
--exclude '*.pyc' \
@@ -120,9 +119,9 @@ ENV BRUTEFORCE=false
120119
ENV WORKDIR=/app
121120
WORKDIR ${WORKDIR}
122121

123-
RUN adduser -D worker
124-
RUN mkdir -p /app
125-
RUN chown worker:worker /app
122+
RUN adduser -D worker \
123+
&& mkdir -p /app \
124+
&& chown worker:worker /app
126125

127126
COPY ./Makefile ${WORKDIR}/
128127

0 commit comments

Comments
 (0)