feat(docker): reduce the size of alpine docker images (#3973)

* reduce redundant code between the two alpine Dockerfiles
* reduce the docker image build times
* reduce the `n8n` image size from 1.17GB to 462MB
* reduce the `n8n-custom` image size from 671MB to 460MB
* reduce the size of npm tree by making all typing packages devDependencies

Partially resolves this ticket: N8N-3252
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-08-31 15:25:52 +02:00
committed by GitHub
parent 8fc9f07f39
commit 398adb23e8
13 changed files with 277 additions and 185 deletions

View File

@@ -58,6 +58,7 @@
"oclif.manifest.json"
],
"devDependencies": {
"@apidevtools/swagger-cli": "4.0.0",
"@oclif/dev-cli": "^1.22.2",
"@types/basic-auth": "^1.1.2",
"@types/bcryptjs": "^2.4.2",
@@ -69,8 +70,11 @@
"@types/dotenv": "^8.2.0",
"@types/express": "^4.17.6",
"@types/jest": "^27.4.0",
"@types/json-diff": "^0.5.1",
"@types/jsonwebtoken": "^8.5.2",
"@types/localtunnel": "^1.9.0",
"@types/lodash.get": "^4.4.6",
"@types/lodash.intersection": "^4.4.7",
"@types/lodash.merge": "^4.6.6",
"@types/lodash.omit": "^4.5.7",
"@types/lodash.set": "^4.3.6",
@@ -81,10 +85,13 @@
"@types/parseurl": "^1.3.1",
"@types/passport-jwt": "^3.0.6",
"@types/psl": "^1.1.0",
"@types/shelljs": "^0.8.11",
"@types/superagent": "4.1.13",
"@types/supertest": "^2.0.11",
"@types/swagger-ui-express": "^4.1.3",
"@types/uuid": "^8.3.2",
"@types/validator": "^13.7.0",
"@types/yamljs": "^0.2.31",
"concurrently": "^5.1.0",
"jest": "^27.4.7",
"jest-mock": "^28.1.3",
@@ -96,17 +103,10 @@
"typescript": "~4.6.0"
},
"dependencies": {
"@apidevtools/swagger-cli": "4.0.0",
"@oclif/command": "^1.5.18",
"@oclif/core": "^1.9.3",
"@oclif/errors": "^1.2.2",
"@rudderstack/rudder-sdk-node": "1.0.6",
"@types/json-diff": "^0.5.1",
"@types/jsonwebtoken": "^8.5.2",
"@types/lodash.intersection": "^4.4.7",
"@types/shelljs": "^0.8.11",
"@types/swagger-ui-express": "^4.1.3",
"@types/yamljs": "^0.2.31",
"axios": "^0.21.1",
"basic-auth": "^2.0.1",
"bcryptjs": "^2.4.3",