Skip to content

Commit

Permalink
Merge pull request #239 from solarchad/support-rm-container-prestart-…
Browse files Browse the repository at this point in the history
…upstart-fix

fix: avoid setting multiple pre-start stanzas in upstart
  • Loading branch information
myii authored Jan 22, 2020
2 parents 15c803d + 80a2a98 commit 13c1c20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/files/upstart.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ respawn
{%- set pull_before_start = container.get("pull_before_start") or False %}
{%- set remove_before_start = container.get("remove_before_start") or False %}

{%- if pull_before_start %}
{%- if pull_before_start or remove_before_start -%}
pre-start script
{%- if pull_before_start %}
/usr/bin/docker pull {{ container.image }}
end script
{%- endif %}

{%- if remove_before_start %}
pre-start script
/usr/bin/docker rm -f {{ name }}
{%- endif %}
end script
{%- endif %}

Expand Down

0 comments on commit 13c1c20

Please sign in to comment.