Skip to content

Commit 5191189

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Docker] a little performance increase in (re)build time and note added.
1 parent 35171b4 commit 5191189

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

Dockerfile

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,44 @@ FROM base AS lint
1010
ENV WORKDIR=/app
1111
WORKDIR ${WORKDIR}
1212

13-
COPY ./src ${WORKDIR}/src
1413
RUN apk add --update --no-cache make nodejs npm
1514
RUN apk add --update --no-cache yamllint
1615

1716
RUN npm install -g --ignore-scripts markdownlint-cli
1817
RUN npm install -g --ignore-scripts pyright
1918

19+
# [!TIP] Use a bind-mount to "/app" to override following "copys"
20+
# for lint and test against "current" sources in this stage
21+
22+
# YAML sources
23+
COPY ./.github ${WORKDIR}/
24+
COPY ./compose.yaml ${WORKDIR}/
25+
26+
# Markdown sources
27+
COPY ./docs ${WORKDIR}/
28+
COPY ./README.md ${WORKDIR}/
29+
COPY ./LICENSE.md ${WORKDIR}/
30+
COPY ./CODE_OF_CONDUCT.md ${WORKDIR}/
31+
32+
# Code source
33+
COPY ./src ${WORKDIR}/
34+
COPY ./requirements.txt ${WORKDIR}/
35+
COPY ./setup.cfg ${WORKDIR}/
36+
COPY ./Makefile ${WORKDIR}/
37+
38+
# markdownlint conf
39+
COPY ./.markdownlint.yaml ${WORKDIR}/
40+
41+
# yamllint conf
42+
COPY ./.yamllint ${WORKDIR}/
43+
COPY ./.yamlignore ${WORKDIR}/
44+
45+
# pylint and covergae
46+
COPY ./.pylintrc ${WORKDIR}/
47+
COPY ./.coveragerc ${WORKDIR}/
48+
49+
CMD ["make", "lint"]
50+
2051
###############################################################################
2152
FROM base AS development
2253

@@ -46,7 +77,6 @@ ENV BRUTEFORCE=false
4677

4778
WORKDIR /app
4879

49-
COPY ./.pylintrc ${WORKDIR}/
5080
COPY ./.coveragerc ${WORKDIR}/
5181
RUN ls -alh
5282

@@ -68,8 +98,6 @@ RUN chown worker:worker /app
6898

6999
WORKDIR /app
70100

71-
COPY ./.pylintrc ${WORKDIR}/
72-
COPY ./.coveragerc ${WORKDIR}/
73101
RUN ls -alh
74102

75103
USER worker

0 commit comments

Comments
 (0)