-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only configure
docker
wrapper on macOS.
- Loading branch information
1 parent
f7c5759
commit cc142c9
Showing
2 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'macos' | ||
|
||
task :docker => :'brew:formulae_and_casks' do | ||
docker_dir = File.expand_path('~/.docker') | ||
|
||
if macos? | ||
fish_function = Pathname('~/.config/fish/functions/docker.fish').expand_path | ||
fish_function.dirname.mkpath | ||
fish_function.write <<~FISH | ||
# This file was created automatically, do not edit it directly. | ||
function docker --wraps docker | ||
if contains -- -h $argv || contains -- --help $argv || test (count $argv) = 0; else | ||
if ! pgrep Docker >&- | ||
open -jga Docker | ||
end | ||
while true | ||
set -l ping_status (curl --fail --unix-socket ~/.docker/run/docker.sock 'http://localhost/_ping' 2>&-) | ||
if test "$ping_status" = OK | ||
break | ||
else | ||
sleep 1 | ||
end | ||
end | ||
end | ||
command docker $argv | ||
end | ||
FISH | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.