Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1340 from jeffdm/master
Browse files Browse the repository at this point in the history
Fix bug where entry point would be repeated if no CMD was specified
  • Loading branch information
JeffDM committed Jan 8, 2016
2 parents 9c94522 + 1b9a048 commit 1807681
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/DockerUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ export default {
if (!containerData.HostConfig || (containerData.HostConfig && !containerData.HostConfig.PortBindings)) {
containerData.PublishAllPorts = true;
}

if (image.Config.Cmd) {
containerData.Cmd = image.Config.Cmd;
} else if (!image.Config.Entrypoint) {
containerData.Cmd = 'bash';
}

containerData.Cmd = image.Config.Cmd || image.Config.Entrypoint || 'bash';
let existing = this.client.getContainer(name);
existing.kill(() => {
existing.remove(() => {
Expand Down

0 comments on commit 1807681

Please sign in to comment.