Browse Source

Don't require for CMD and EXPOSE to be defined in Dockerfile used for (#237)

deploying but allow those to be defined in upstream Dockerfiles
master
Jarmo Isotalo 8 years ago
committed by Leo Lamprecht
parent
commit
3732bfb16c
  1. 14
      lib/read-metadata.js

14
lib/read-metadata.js

@ -74,20 +74,6 @@ module.exports = async function (path, {
throw e
}
if (!docker.some(cmd => cmd.name === 'CMD')) {
const e = Error('No `CMD` found in `Dockerfile`. ' +
'See: https://docs.docker.com/engine/reference/builder/#/cmd')
e.userError = true
throw e
}
if (!docker.some(cmd => cmd.name === 'EXPOSE')) {
const e = Error('No `EXPOSE` found in `Dockerfile`. A port must be supplied. ' +
'See: https://docs.docker.com/engine/reference/builder/#/expose')
e.userError = true
throw e
}
const labels = {}
docker
.filter(cmd => cmd.name === 'LABEL')

Loading…
Cancel
Save