Skip to content

Commit 8eeb616

Browse files
nekosaurjohnleider
authored andcommitted
chore(docs): decrease docker image size (vuetifyjs#9718)
* chore: decreased docker image size * chore: updated build process updated Dockerfile to use a single step changed postinstall to prepare so that it does not trigger when running build after installing only production deps.
1 parent e92856a commit 8eeb616

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
.vscode
3+
.devbots
4+
.github
5+
node_modules

Dockerfile

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
FROM mhart/alpine-node:12
22

33
COPY . .
4+
RUN yarn && \
5+
yarn build && \
6+
rm -rf node_modules && \
7+
# shitty workaround for cypress installing
8+
# binaries into root cache because kitchen
9+
# uses it.
10+
rm -rf root/.cache && \
11+
yarn --production=true && \
12+
yarn cache clean
413

514
EXPOSE 8095
6-
7-
RUN yarn
8-
RUN yarn build
915
CMD ["yarn", "start"]

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
"lint": "lerna run lint --parallel --stream",
1818
"lint:fix": "lerna run lint:fix --parallel",
1919
"version": "node scripts/confirm-npm-tag.js",
20-
"postinstall": "node scripts/post-install.js",
21-
"postversion": "node scripts/post-release-merge.js"
20+
"prepare": "node scripts/post-install.js",
21+
"postversion": "node scripts/post-release-merge.js",
22+
"clean": "lerna clean"
2223
},
2324
"engines": {
2425
"node": ">= 10",

packages/docs/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121
"date-fns": "^1.30.1",
2222
"dotenv": "^8.0.0",
2323
"es6-promise": "^4.2.8",
24+
"event-source-polyfill": "^1.0.7",
2425
"express": "^4.17.1",
2526
"intersection-observer": "^0.7.0",
2627
"iso-639-1": "^2.0.5",
2728
"lodash": "^4.17.15",
2829
"lru-cache": "^5.1.1",
30+
"marked": "^0.7.0",
2931
"memory-fs": "^0.4.1",
3032
"moment": "^2.24.0",
3133
"node-fetch": "^2.6.0",
34+
"ouch": "^2.0.0",
3235
"pluralize": "^8.0.0",
3336
"route-cache": "^0.4.4",
3437
"serve-favicon": "^2.5.0",
@@ -58,15 +61,12 @@
5861
"eslint": "^6.1.0",
5962
"eslint-plugin-json": "^1.4.0",
6063
"eslint-plugin-vuetify": "^1.0.0-beta.4",
61-
"event-source-polyfill": "^1.0.7",
6264
"fibers": "^4.0.1",
6365
"file-loader": "^4.1.0",
6466
"friendly-errors-webpack-plugin": "^1.7.0",
6567
"html-webpack-plugin": "^3.2.0",
66-
"marked": "^0.7.0",
6768
"mini-css-extract-plugin": "^0.8.0",
6869
"null-loader": "^3.0.0",
69-
"ouch": "^2.0.0",
7070
"prismjs": "^1.17.1",
7171
"pug": "^2.0.4",
7272
"pug-plain-loader": "^1.0.0",

yarn.lock

+9-4
Original file line numberDiff line numberDiff line change
@@ -5740,7 +5740,12 @@ [email protected]:
57405740
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
57415741
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
57425742

5743-
ejs@^2.3.1, ejs@^2.6.1:
5743+
ejs@^2.3.1:
5744+
version "2.7.1"
5745+
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.1.tgz#5b5ab57f718b79d4aca9254457afecd36fa80228"
5746+
integrity sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ==
5747+
5748+
ejs@^2.6.1:
57445749
version "2.6.1"
57455750
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0"
57465751
integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==
@@ -6175,9 +6180,9 @@ [email protected]:
61756180
integrity sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ==
61766181

61776182
event-source-polyfill@^1.0.7:
6178-
version "1.0.7"
6179-
resolved "https://registry.yarnpkg.com/event-source-polyfill/-/event-source-polyfill-1.0.7.tgz#79a0a432e00ef53387309d6213d98332bab0a4ea"
6180-
integrity sha512-TPbIjt4c3dlO7WTdsaTdwcxD1jKl+2gGD6dfauEmGqRNtpoB9ith/c4qa+X8XbTV5FsvTrkjepXfamWxntklVA==
6183+
version "1.0.9"
6184+
resolved "https://registry.yarnpkg.com/event-source-polyfill/-/event-source-polyfill-1.0.9.tgz#1fe3ebf8e3faddafd4fc237424f5e5ab2706b6d0"
6185+
integrity sha512-+x0BMKTYwZcmGmlkHK0GsXkX1+otfEwqu3QitN0wmWuHaZniw3HeIx1k5OjWX3JUHQHlPS4yONol6eokS1ZAWg==
61816186

61826187
event-stream@=3.3.4:
61836188
version "3.3.4"

0 commit comments

Comments
 (0)