Skip to content

Instantly share code, notes, and snippets.

@niratama
Created June 6, 2019 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niratama/2cfe734cd6633387dc9f73fb24a78a0c to your computer and use it in GitHub Desktop.
Save niratama/2cfe734cd6633387dc9f73fb24a78a0c to your computer and use it in GitHub Desktop.
CoreOS最新版で動かない対策のやっつけパッチ
git clone https://github.com/tmatilai/vagrant-proxyconf.git
cd vagrant-proxyconf/
(パッチ当て)
gem build vagrant-proxyconf.gemspec
vagrant plugin uninstall vagrant-proxyconf
vagrant plugin install vagrant-proxyconf-(バージョン).gem
diff --git a/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb b/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb
index 144e2ce..1152642 100644
--- a/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb
+++ b/lib/vagrant-proxyconf/cap/coreos/docker_proxy_conf.rb
@@ -15,6 +15,9 @@ module VagrantPlugins
dst_file = '/etc/systemd/system/docker.service'
tmp_file = '/tmp/docker.service'
env_file = 'EnvironmentFile=-\/etc\/default\/docker'
+ if comm.test("test ! -e #{src_file}") then
+ src_file = '/run/systemd/system/docker.service'
+ end
comm.sudo("sed -e 's/\\[Service\\]/[Service]\\n#{env_file}/g' #{src_file} > #{tmp_file}")
unless comm.test("diff #{tmp_file} #{dst_file}")
# update config and restart docker when config changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment