Skip to content

Commit c64e185

Browse files
authored
Adjust find commands to clean up files in same step (#3588)
* clean /venvs folder only through find * Clean Python files after Megalinter install with find * Use a single find call to clean up npm package installation * Clean megalinter install with a single find call in /server * Update build files
1 parent 1baf62c commit c64e185

File tree

145 files changed

+253
-747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+253
-747
lines changed

.automation/build.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -522,16 +522,17 @@ def build_dockerfile(
522522
+ ' && echo "Changing owner of node_modules files…" \\\n'
523523
+ ' && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \\\n'
524524
+ ' && echo "Removing extra node_module files…" \\\n'
525-
+ " && rm -rf /root/.npm/_cacache \\\n"
526-
+ ' && find . -name "*.d.ts" -delete \\\n'
527-
+ ' && find . -name "*.map" -delete \\\n'
528-
+ ' && find . -name "*.npmignore" -delete \\\n'
529-
+ ' && find . -name "*.travis.yml" -delete \\\n'
530-
+ ' && find . -name "CHANGELOG.md" -delete \\\n'
531-
+ ' && find . -name "README.md" -delete \\\n'
532-
+ ' && find . -name ".package-lock.json" -delete \\\n'
533-
+ ' && find . -name "package-lock.json" -delete \\\n'
534-
+ ' && find . -name "README.md" -delete\n'
525+
+ ' && find . \\( -not -path "/proc" \\)'
526+
+ ' -and \\( -type f'
527+
+ ' \\( -iname "*.d.ts"'
528+
+ ' -o -iname "*.map"'
529+
+ ' -o -iname "*.npmignore"'
530+
+ ' -o -iname "*.travis.yml"'
531+
+ ' -o -iname "CHANGELOG.md"'
532+
+ ' -o -iname "README.md"'
533+
+ ' -o -iname ".package-lock.json"'
534+
+ ' -o -iname "package-lock.json"'
535+
+ ' \\) -o -type d -name /root/.npm/_cacache \\) -delete \n'
535536
+ "WORKDIR /\n"
536537
)
537538
replace_in_file(dockerfile, "#NPM__START", "#NPM__END", npm_install_command)
@@ -571,7 +572,7 @@ def build_dockerfile(
571572
pipenv_install_command = pipenv_install_command[:-2] # remove last \
572573
pipenv_install_command += (
573574
" \\\n && "
574-
+ r"find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete"
575+
+ r"find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete"
575576
+ " \\\n && "
576577
+ "rm -rf /root/.cache\n"
577578
+ env_path_command

Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale
200200
&& mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \
201201
&& mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \
202202
&& mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \
203-
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
203+
&& find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
204204
&& rm -rf /root/.cache
205205
ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/cfn-lint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/bandit/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin
206206
#PIPVENV__END
@@ -268,16 +268,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
268268
&& echo "Changing owner of node_modules files…" \
269269
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
270270
&& echo "Removing extra node_module files…" \
271-
&& rm -rf /root/.npm/_cacache \
272-
&& find . -name "*.d.ts" -delete \
273-
&& find . -name "*.map" -delete \
274-
&& find . -name "*.npmignore" -delete \
275-
&& find . -name "*.travis.yml" -delete \
276-
&& find . -name "CHANGELOG.md" -delete \
277-
&& find . -name "README.md" -delete \
278-
&& find . -name ".package-lock.json" -delete \
279-
&& find . -name "package-lock.json" -delete \
280-
&& find . -name "README.md" -delete
271+
&& find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete
281272
WORKDIR /
282273

283274
#NPM__END
@@ -763,7 +754,7 @@ COPY megalinter /megalinter
763754
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
764755
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
765756
&& rm -rf /var/cache/apk/* \
766-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
757+
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete
767758

768759
#######################################
769760
# Copy scripts and rules to container #

flavors/c_cpp/Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale
137137
&& mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \
138138
&& mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \
139139
&& mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \
140-
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
140+
&& find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
141141
&& rm -rf /root/.cache
142142
ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin
143143
#PIPVENV__END
@@ -179,16 +179,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
179179
&& echo "Changing owner of node_modules files…" \
180180
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
181181
&& echo "Removing extra node_module files…" \
182-
&& rm -rf /root/.npm/_cacache \
183-
&& find . -name "*.d.ts" -delete \
184-
&& find . -name "*.map" -delete \
185-
&& find . -name "*.npmignore" -delete \
186-
&& find . -name "*.travis.yml" -delete \
187-
&& find . -name "CHANGELOG.md" -delete \
188-
&& find . -name "README.md" -delete \
189-
&& find . -name ".package-lock.json" -delete \
190-
&& find . -name "package-lock.json" -delete \
191-
&& find . -name "README.md" -delete
182+
&& find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete
192183
WORKDIR /
193184

194185
#NPM__END
@@ -324,7 +315,7 @@ COPY megalinter /megalinter
324315
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
325316
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
326317
&& rm -rf /var/cache/apk/* \
327-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
318+
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete
328319

329320
#######################################
330321
# Copy scripts and rules to container #

flavors/ci_light/Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
107107
#PIPVENV__START
108108
RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtualenv \
109109
&& mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \
110-
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
110+
&& find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
111111
&& rm -rf /root/.cache
112112
ENV PATH="${PATH}":/venvs/yamllint/bin
113113
#PIPVENV__END
@@ -136,16 +136,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
136136
&& echo "Changing owner of node_modules files…" \
137137
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
138138
&& echo "Removing extra node_module files…" \
139-
&& rm -rf /root/.npm/_cacache \
140-
&& find . -name "*.d.ts" -delete \
141-
&& find . -name "*.map" -delete \
142-
&& find . -name "*.npmignore" -delete \
143-
&& find . -name "*.travis.yml" -delete \
144-
&& find . -name "CHANGELOG.md" -delete \
145-
&& find . -name "README.md" -delete \
146-
&& find . -name ".package-lock.json" -delete \
147-
&& find . -name "package-lock.json" -delete \
148-
&& find . -name "README.md" -delete
139+
&& find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete
149140
WORKDIR /
150141

151142
#NPM__END
@@ -223,7 +214,7 @@ COPY megalinter /megalinter
223214
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
224215
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
225216
&& rm -rf /var/cache/apk/* \
226-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
217+
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete
227218

228219
#######################################
229220
# Copy scripts and rules to container #

flavors/cupcake/Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale
172172
&& mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \
173173
&& mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \
174174
&& mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \
175-
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
175+
&& find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
176176
&& rm -rf /root/.cache
177177
ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/cfn-lint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin
178178
#PIPVENV__END
@@ -235,16 +235,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
235235
&& echo "Changing owner of node_modules files…" \
236236
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
237237
&& echo "Removing extra node_module files…" \
238-
&& rm -rf /root/.npm/_cacache \
239-
&& find . -name "*.d.ts" -delete \
240-
&& find . -name "*.map" -delete \
241-
&& find . -name "*.npmignore" -delete \
242-
&& find . -name "*.travis.yml" -delete \
243-
&& find . -name "CHANGELOG.md" -delete \
244-
&& find . -name "README.md" -delete \
245-
&& find . -name ".package-lock.json" -delete \
246-
&& find . -name "package-lock.json" -delete \
247-
&& find . -name "README.md" -delete
238+
&& find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete
248239
WORKDIR /
249240

250241
#NPM__END
@@ -523,7 +514,7 @@ COPY megalinter /megalinter
523514
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
524515
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
525516
&& rm -rf /var/cache/apk/* \
526-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
517+
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete
527518

528519
#######################################
529520
# Copy scripts and rules to container #

flavors/documentation/Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale
135135
&& mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \
136136
&& mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \
137137
&& mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \
138-
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
138+
&& find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
139139
&& rm -rf /root/.cache
140140
ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin
141141
#PIPVENV__END
@@ -177,16 +177,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
177177
&& echo "Changing owner of node_modules files…" \
178178
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
179179
&& echo "Removing extra node_module files…" \
180-
&& rm -rf /root/.npm/_cacache \
181-
&& find . -name "*.d.ts" -delete \
182-
&& find . -name "*.map" -delete \
183-
&& find . -name "*.npmignore" -delete \
184-
&& find . -name "*.travis.yml" -delete \
185-
&& find . -name "CHANGELOG.md" -delete \
186-
&& find . -name "README.md" -delete \
187-
&& find . -name ".package-lock.json" -delete \
188-
&& find . -name "package-lock.json" -delete \
189-
&& find . -name "README.md" -delete
180+
&& find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete
190181
WORKDIR /
191182

192183
#NPM__END
@@ -322,7 +313,7 @@ COPY megalinter /megalinter
322313
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
323314
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
324315
&& rm -rf /var/cache/apk/* \
325-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
316+
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete
326317

327318
#######################################
328319
# Copy scripts and rules to container #

flavors/dotnet/Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale
143143
&& mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \
144144
&& mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \
145145
&& mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \
146-
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
146+
&& find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
147147
&& rm -rf /root/.cache
148148
ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/djlint/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin
149149
#PIPVENV__END
@@ -188,16 +188,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
188188
&& echo "Changing owner of node_modules files…" \
189189
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
190190
&& echo "Removing extra node_module files…" \
191-
&& rm -rf /root/.npm/_cacache \
192-
&& find . -name "*.d.ts" -delete \
193-
&& find . -name "*.map" -delete \
194-
&& find . -name "*.npmignore" -delete \
195-
&& find . -name "*.travis.yml" -delete \
196-
&& find . -name "CHANGELOG.md" -delete \
197-
&& find . -name "README.md" -delete \
198-
&& find . -name ".package-lock.json" -delete \
199-
&& find . -name "package-lock.json" -delete \
200-
&& find . -name "README.md" -delete
191+
&& find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete
201192
WORKDIR /
202193

203194
#NPM__END
@@ -384,7 +375,7 @@ COPY megalinter /megalinter
384375
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
385376
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
386377
&& rm -rf /var/cache/apk/* \
387-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
378+
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete
388379

389380
#######################################
390381
# Copy scripts and rules to container #

0 commit comments

Comments
 (0)