lib/minke/docker/docker_compose.rb in minke-1.12.8 vs lib/minke/docker/docker_compose.rb in minke-1.12.9
- old
+ new
@@ -52,17 +52,18 @@
unless @docker_network == nil
hash.merge!(create_compose_network)
end
- directory = @system_runner.mktmpdir
- temp_file = directory + '/docker-compose.yml'
+ directory = File.dirname(@compose_file)
+
+ temp_file = directory + '/tmp_docker-compose.yml'
@system_runner.write_file temp_file, YAML.dump(hash)
ex = "docker-compose -f #{temp_file} -p #{@project_name} #{command}"
@system_runner.execute ex
- @system_runner.remove_entry_secure directory
+ @system_runner.remove_entry_secure temp_file
end
def create_compose_network
{ 'networks' => {'default' => { 'external' => { 'name' => @docker_network } } } }
end