17 lines
372 B
Fish
Executable File
17 lines
372 B
Fish
Executable File
#!/usr/bin/env fish
|
|
|
|
set this_dir (realpath (dirname (status -f)))
|
|
set image_working_dir (realpath "$this_dir/../..")
|
|
|
|
set image_name $argv[1]
|
|
if test (count $argv) -eq 0
|
|
set image_name_cmd "$this_dir/docker_image_name.fish"
|
|
set image_name (eval $image_name_cmd)
|
|
end
|
|
|
|
docker build \
|
|
-f "$this_dir/Dockerfile" \
|
|
-t "$image_name" \
|
|
"$image_working_dir"
|
|
|