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
Created
June 6, 2019 11:20
-
-
Save niratama/2cfe734cd6633387dc9f73fb24a78a0c to your computer and use it in GitHub Desktop.
CoreOS最新版で動かない対策のやっつけパッチ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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