From 3732bfb16ccc36794ec1cd0a646dfefbe4ff7624 Mon Sep 17 00:00:00 2001 From: Jarmo Isotalo Date: Tue, 24 Jan 2017 15:06:04 +0200 Subject: [PATCH] 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 --- lib/read-metadata.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/read-metadata.js b/lib/read-metadata.js index 9000be4..4b9f626 100644 --- a/lib/read-metadata.js +++ b/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')