Skip to content

Commit 7cc2eab

Browse files
authored
chore(Dockerfile) : remove not useful files
Let's see if it changes something
1 parent 5364e34 commit 7cc2eab

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Dockerfile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,28 @@ COPY package*.json ./
3939
#RUN npm ci --only=production
4040
RUN npm ci --no-optional
4141

42-
# Removes unnecessary files in node modules
42+
# Removes unnecessary files/folders in node modules
43+
# Files
4344
RUN find "$(pwd)/node_modules" -type f -name "*.ts" -exec rm -f {} \;
4445
RUN find "$(pwd)/node_modules" -type f -name "*.md" -exec rm -f {} \;
45-
RUN find "$(pwd)/node_modules" -type d -name "docs" -prune -exec rm -rf {} +;
46+
RUN find "$(pwd)/node_modules" -type f -name "*.swp" -exec rm -f {} \;
47+
RUN find "$(pwd)/node_modules" -type f -name "LICENSE" -exec rm -f {} \;
48+
RUN find "$(pwd)/node_modules" -type f -name "AUTHORS" -exec rm -f {} \;
49+
RUN find "$(pwd)/node_modules" -type f -name "CONTRIBUTORS" -exec rm -f {} \;
50+
RUN find "$(pwd)/node_modules" -type f -name "CHANGES" -exec rm -f {} \;
51+
RUN find "$(pwd)/node_modules" -type f -name ".prettierrc*" -exec rm -f {} \;
52+
RUN find "$(pwd)/node_modules" -type f -name ".npm*" -exec rm -f {} \;
53+
RUN find "$(pwd)/node_modules" -type f -name ".travis.yml" -exec rm -f {} \;
54+
RUN find "$(pwd)/node_modules" -type f -name "appveyor.yml" -exec rm -f {} \;
55+
RUN find "$(pwd)/node_modules" -type f -name "*.coveralls.yml" -exec rm -f {} \;
56+
57+
# Folders
58+
RUN find "$(pwd)/node_modules" -type d -name "docs?" -prune -exec rm -rf {} +;
59+
RUN find "$(pwd)/node_modules" -type d -name "tests?" -prune -exec rm -rf {} +;
60+
RUN find "$(pwd)/node_modules" -type d -name ".idea" -prune -exec rm -rf {} +;
61+
RUN find "$(pwd)/node_modules" -type d -name ".vscode" -prune -exec rm -rf {} +;
62+
RUN find "$(pwd)/node_modules" -type d -name "__tests__" -prune -exec rm -rf {} +;
63+
RUN find "$(pwd)/node_modules" -type d -name "coverage" -prune -exec rm -rf {} +;
4664

4765
# Default port
4866
EXPOSE 3000

0 commit comments

Comments
 (0)