Fix Docker build (#2815)

Close #2814
This commit is contained in:
Paul Melnikow
2019-01-20 15:01:07 -05:00
committed by GitHub
parent 7789e80fe5
commit a8e27d139d
3 changed files with 9 additions and 8 deletions

View File

@@ -8,14 +8,18 @@ WORKDIR /usr/src/app
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
COPY package.json /usr/src/app/
COPY package.json package-lock.json /usr/src/app/
# Without the gh-badges package.json and CLI script in place, `npm install` will fail.
COPY gh-badges /usr/src/app/gh-badges/
RUN npm install
COPY . /usr/src/app
RUN npm run build
RUN npm prune --production
RUN npm cache clean --force
# Do we need to list the environment variables here?
node server
CMD node server
EXPOSE 80

5
package-lock.json generated
View File

@@ -8231,7 +8231,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/joi-extension-semver/-/joi-extension-semver-2.0.0.tgz",
"integrity": "sha1-/XTCn1nDm2hlIlj0MCVDV2qYVQU=",
"dev": true,
"requires": {
"semver": "^5.3.0"
}
@@ -12417,7 +12416,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz",
"integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=",
"dev": true,
"requires": {
"xtend": "~4.0.1"
}
@@ -16726,8 +16724,7 @@
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
"dev": true
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
},
"y18n": {
"version": "3.2.1",

View File

@@ -38,6 +38,7 @@
"glob": "^7.1.1",
"joi": "14.3.1",
"js-yaml": "^3.12.1",
"joi-extension-semver": "2.0.0",
"jsonpath": "~1.0.0",
"lodash.countby": "^4.6.0",
"lodash.mapkeys": "^4.6.0",
@@ -45,6 +46,7 @@
"lodash.times": "^4.3.2",
"moment": "^2.23.0",
"node-env-flag": "^0.1.0",
"parse-link-header": "^1.0.1",
"path-to-regexp": "^3.0.0",
"pretty-bytes": "^5.0.0",
"priorityqueuejs": "^1.0.0",
@@ -160,7 +162,6 @@
"icedfrisby-nock": "^1.1.0",
"is-png": "^1.1.0",
"is-svg": "^3.0.0",
"joi-extension-semver": "2.0.0",
"js-yaml-loader": "^1.0.1",
"lint-staged": "^8.1.0",
"lodash.debounce": "^4.0.8",
@@ -180,7 +181,6 @@
"npm-run-all": "^4.1.5",
"nyc": "^13.0.1",
"opn-cli": "^4.0.0",
"parse-link-header": "^1.0.1",
"portfinder": "^1.0.20",
"prettier": "1.15.3",
"prettier-check": "^2.0.0",