Skip to content

Commit

Permalink
do not use newlines in docker start command
Browse files Browse the repository at this point in the history
  • Loading branch information
EugenMayer committed Feb 19, 2017
1 parent 69020c6 commit 151e21f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
docker-sync (0.2.0.rc1)
docker-sync (0.2.0)
daemons (~> 1.2, >= 1.2.3)
docker-compose (~> 1.0, >= 1.0.2)
dotenv (~> 2.1, >= 2.1.1)
Expand Down
9 changes: 1 addition & 8 deletions lib/docker-sync/sync_strategy/unison.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,7 @@ def start_container
if exists == ''
say_status 'ok', "creating #{container_name} container", :white if @options['verbose']
run_privileged = '--privileged' if @options.key?('max_inotify_watches') #TODO: replace by the minimum capabilities required
cmd = "docker run -p '#{@options['sync_host_ip']}::#{UNISON_CONTAINER_PORT}' \
-v #{volume_name}:#{@options['dest']} \
-e VOLUME=#{@options['dest']} \
-e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} \
#{additional_docker_env} \
#{run_privileged} \
--name #{container_name} \
-d #{@docker_image}"
cmd = "docker run -p '#{@options['sync_host_ip']}::#{UNISON_CONTAINER_PORT}' -v #{volume_name}:#{@options['dest']} -e VOLUME=#{@options['dest']} -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} #{additional_docker_env} #{run_privileged} --name #{container_name} -d #{@docker_image}"
else
say_status 'ok', "starting #{container_name} container", :white if @options['verbose']
cmd = "docker start #{container_name} && docker exec #{container_name} supervisorctl restart unison"
Expand Down

0 comments on commit 151e21f

Please sign in to comment.