Skip to content

Commit 333ab1c

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

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

Dockerfile

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,42 @@ 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+
2049
###############################################################################
2150
FROM base AS development
2251

@@ -46,7 +75,6 @@ ENV BRUTEFORCE=false
4675

4776
WORKDIR /app
4877

49-
COPY ./.pylintrc ${WORKDIR}/
5078
COPY ./.coveragerc ${WORKDIR}/
5179
RUN ls -alh
5280

@@ -68,8 +96,6 @@ RUN chown worker:worker /app
6896

6997
WORKDIR /app
7098

71-
COPY ./.pylintrc ${WORKDIR}/
72-
COPY ./.coveragerc ${WORKDIR}/
7399
RUN ls -alh
74100

75101
USER worker

0 commit comments

Comments
 (0)