<% if @before_start -%> <%= @before_start %> <% end -%> <% if @remove_container_on_start -%> /usr/bin/<%= @docker_command %> rm <% if @remove_volume_on_start %>-v<% end %> <%= @sanitised_title %> >/dev/null 2>&1 <% end -%> <% if @pull_on_start -%> /usr/bin/<%= @docker_command %> pull <%= @image %> <% end -%> /usr/bin/<%= @docker_command %> create \ <%= @docker_run_flags %> \ --name <%= @sanitised_title %> \ <%= @image %> \ <% if @command %> <%= @command %><% end %> <% if @after_create %><%= @after_create %><% end %> /usr/bin/<%= @docker_command %> start <% if ! @valid_detach %>-a<% end %> <%= @sanitised_title %>