Revisions
-
pomeo revised this gist
Sep 24, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ sudo docker run \ --name {{printf "%q" .Name}} \ {{- with .HostConfig}} {{- if .Privileged}} -
efrecon revised this gist
May 16, 2023 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -104,6 +104,9 @@ docker run \ {{- range $p, $conf := .ExposedPorts}} --expose {{printf "%q" $p}} \ {{- end}} {{- end}} {{- if .User}} --user {{printf "%q" .User}} \ {{- end}} {{- range $e := .Env}} --env {{printf "%q" $e}} \ -
efrecon revised this gist
May 16, 2023 . 1 changed file with 26 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,9 +19,30 @@ docker run \ {{- range $l := .Links}} --link {{printf "%q" $l}} \ {{- end}} {{- if index . "Mounts"}} {{- range $m := .Mounts}} --mount type={{.Type}} {{- if $s := index $m "Source"}},source={{$s}}{{- end}} {{- if $t := index $m "Target"}},destination={{$t}}{{- end}} {{- if index $m "ReadOnly"}},readonly{{- end}} {{- if $vo := index $m "VolumeOptions"}} {{- range $i, $v := $vo.Labels}} {{- printf ",volume-label=%s=%s" $i $v}} {{- end}} {{- if $dc := index $vo "DriverConfig" }} {{- if $n := index $dc "Name" }} {{- printf ",volume-driver=%s" $n}} {{- end}} {{- range $i, $v := $dc.Options}} {{- printf ",volume-opt=%s=%s" $i $v}} {{- end}} {{- end}} {{- end}} {{- if $bo := index $m "BindOptions"}} {{- if $p := index $bo "Propagation" }} {{- printf ",bind-propagation=%s" $p}} {{- end}} {{- end}} \ {{- end}} {{- end}} {{- if .PublishAllPorts}} @@ -79,8 +100,10 @@ docker run \ {{- if .Domainname}} --domainname {{printf "%q" .Domainname}} \ {{- end}} {{- if index . "ExposedPorts"}} {{- range $p, $conf := .ExposedPorts}} --expose {{printf "%q" $p}} \ {{- end}} {{- end}} {{- range $e := .Env}} --env {{printf "%q" $e}} \ -
efrecon revised this gist
Feb 10, 2023 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,13 +15,15 @@ docker run \ {{- end}} {{- range $v := .VolumesFrom}} --volumes-from {{printf "%q" $v}} \ {{- end}} {{- range $l := .Links}} --link {{printf "%q" $l}} \ {{- end}} {{- if .Mounts}} {{- range .Mounts}} --mount type={{.Type}},source={{.Source}},destination={{.Target}}{{- if .BindOptions}},bind-propagation={{.BindOptions.Propagation}}{{- end}}{{- if .ReadOnly}},readonly{{- end}} \ {{- end}} {{- end}} {{- if .PublishAllPorts}} --publish-all \ {{- end}} @@ -117,4 +119,4 @@ docker run \ {{- end}} {{printf "%q" .Image}} \ {{range .Cmd}}{{printf "%q " .}}{{- end}} {{- end}} -
efrecon revised this gist
Feb 3, 2023 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,9 @@ docker run \ {{- end}} {{- range $v := .VolumesFrom}} --volumes-from {{printf "%q" $v}} \ {{- end}} {{- range .Mounts}} --mount type={{.Type}},source={{.Source}},destination={{.Target}}{{- if .BindOptions}},bind-propagation={{.BindOptions.Propagation}}{{- end}}{{- if .ReadOnly}},readonly{{- end}} \ {{- end}} {{- range $l := .Links}} --link {{printf "%q" $l}} \ @@ -114,4 +117,4 @@ docker run \ {{- end}} {{printf "%q" .Image}} \ {{range .Cmd}}{{printf "%q " .}}{{- end}} {{- end}} -
efrecon revised this gist
May 31, 2020 . 1 changed file with 116 additions and 33 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,34 +1,117 @@ docker run \ --name {{printf "%q" .Name}} \ {{- with .HostConfig}} {{- if .Privileged}} --privileged \ {{- end}} {{- if .AutoRemove}} --rm \ {{- end}} {{- if .Runtime}} --runtime {{printf "%q" .Runtime}} \ {{- end}} {{- range $b := .Binds}} --volume {{printf "%q" $b}} \ {{- end}} {{- range $v := .VolumesFrom}} --volumes-from {{printf "%q" $v}} \ {{- end}} {{- range $l := .Links}} --link {{printf "%q" $l}} \ {{- end}} {{- if .PublishAllPorts}} --publish-all \ {{- end}} {{- if .UTSMode}} --uts {{printf "%q" .UTSMode}} \ {{- end}} {{- with .LogConfig}} --log-driver {{printf "%q" .Type}} \ {{- range $o, $v := .Config}} --log-opt {{$o}}={{printf "%q" $v}} \ {{- end}} {{- end}} {{- with .RestartPolicy}} --restart "{{.Name -}} {{- if eq .Name "on-failure"}}:{{.MaximumRetryCount}} {{- end}}" \ {{- end}} {{- range $e := .ExtraHosts}} --add-host {{printf "%q" $e}} \ {{- end}} {{- range $v := .CapAdd}} --cap-add {{printf "%q" $v}} \ {{- end}} {{- range $v := .CapDrop}} --cap-drop {{printf "%q" $v}} \ {{- end}} {{- range $d := .Devices}} --device {{printf "%q" (index $d).PathOnHost}}:{{printf "%q" (index $d).PathInContainer}}:{{(index $d).CgroupPermissions}} \ {{- end}} {{- end}} {{- with .NetworkSettings -}} {{- range $p, $conf := .Ports}} {{- with $conf}} --publish " {{- if $h := (index $conf 0).HostIp}}{{$h}}: {{- end}} {{- (index $conf 0).HostPort}}:{{$p}}" \ {{- end}} {{- end}} {{- range $n, $conf := .Networks}} {{- with $conf}} --network {{printf "%q" $n}} \ {{- range $a := $conf.Aliases}} --network-alias {{printf "%q" $a}} \ {{- end}} {{- end}} {{- end}} {{- end}} {{- with .Config}} {{- if .Hostname}} --hostname {{printf "%q" .Hostname}} \ {{- end}} {{- if .Domainname}} --domainname {{printf "%q" .Domainname}} \ {{- end}} {{- range $p, $conf := .ExposedPorts}} --expose {{printf "%q" $p}} \ {{- end}} {{- range $e := .Env}} --env {{printf "%q" $e}} \ {{- end}} {{- range $l, $v := .Labels}} --label {{printf "%q" $l}}={{printf "%q" $v}} \ {{- end}} {{- if not (or .AttachStdin (or .AttachStdout .AttachStderr))}} --detach \ {{- end}} {{- if .AttachStdin}} --attach stdin \ {{- end}} {{- if .AttachStdout}} --attach stdout \ {{- end}} {{- if .AttachStderr}} --attach stderr \ {{- end}} {{- if .Tty}} --tty \ {{- end}} {{- if .OpenStdin}} --interactive \ {{- end}} {{- if .Entrypoint}} {{- /* Since the entry point cannot be overridden from the command line with an array of size over 1, we are fine assuming the default value in such a case. */ -}} {{- if eq (len .Entrypoint) 1 }} --entrypoint " {{- range $i, $v := .Entrypoint}} {{- if $i}} {{end}} {{- $v}} {{- end}}" \ {{- end}} {{- end}} {{printf "%q" .Image}} \ {{range .Cmd}}{{printf "%q " .}}{{- end}} {{- end}} -
efrecon revised this gist
May 20, 2020 . 1 changed file with 32 additions and 22 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,24 +1,34 @@ docker run \ --name {{.Name}} {{with .HostConfig}}\ {{if .Privileged}}--privileged \ {{end}}{{if .AutoRemove}}--rm \ {{end}}{{if .Runtime}}--runtime {{printf "%q" .Runtime}} \ {{end}}{{range $b := .Binds}}--volume {{printf "%q" $b}} \ {{end}}{{range $v := .VolumesFrom}}--volumes-from {{printf "%q" $v}} \ {{end}}{{range $l := .Links}}--link {{printf "%q" $l}} \ {{end}}{{if .PublishAllPorts}}--publish-all \ {{end}}{{if .UTSMode}}--uts {{printf "%q" .UTSMode}} \ {{end}}{{with .LogConfig}}--log-driver={{printf "%q" .Type}} \ {{range $o, $v := .Config}}--log-opt {{$o}}={{printf "%q" $v}} \ {{end}}{{end}}{{with .RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}:{{.MaximumRetryCount}}{{end}}" \ {{end}}{{range $e := .ExtraHosts}}--add-host {{printf "%q" $e}} \ {{end}}{{range $v := .CapAdd}}--cap-add {{printf "%q" $v}} \ {{end}}{{range $v := .CapDrop}}--cap-drop {{printf "%q" $v}} \ {{end}}{{range $d := .Devices}}--device={{printf "%q" (index $d).PathOnHost}}:{{printf "%q" (index $d).PathInContainer}}:{{(index $d).CgroupPermissions}} \ {{end}}{{end}}{{with .NetworkSettings}}{{range $p, $conf := .Ports}}{{with $conf}}--publish {{if $h := (index $conf 0).HostIp}}{{$h}}:{{end}}{{(index $conf 0).HostPort}}:{{$p}} \ {{end}}{{end}}{{range $n, $conf := .Networks}}{{with $conf}}--network {{printf "%q" $n}} \ {{range $a := $conf.Aliases}}--network-alias {{printf "%q" $a}} \ {{end}}{{end}}{{end}}{{end}}{{with .Config}}{{if .Hostname}}--hostname {{printf "%q" .Hostname}} \ {{end}}{{if .Domainname}}--domainname {{printf "%q" .Domainname}} \ {{end}}{{range $p, $conf := .ExposedPorts}}--expose {{printf "%q" $p}} \ {{end}}{{range $e := .Env}}--env {{printf "%q" $e}} \ {{end}}{{range $l, $v := .Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \ {{end}}{{if not (or .AttachStdin (or .AttachStdout .AttachStderr))}}--detach \ {{end}}{{if .AttachStdin}}--attach stdin \ {{end}}{{if .AttachStdout}}--attach stdout \ {{end}}{{if .AttachStderr}}--attach stderr \ {{end}}{{if .Tty}}--tty \ {{end}}{{if .OpenStdin}}--interactive \ {{end}}{{if .Entrypoint}}--entrypoint="{{range $i, $v := .Entrypoint}}{{if $i}} {{end}}{{$v}}{{end}}" \ {{end}}{{printf "%q" .Image}} \ {{range .Cmd}} {{printf "%q" .}}{{end}}{{end}} -
efrecon revised this gist
Oct 16, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ docker run \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{printf "%q" .}} \ {{end}}{{range $d := .HostConfig.Devices}}--device={{printf "%q" (index $d).PathOnHost}}:{{printf "%q" (index $d).PathInContainer}}:{{(index $d).CgroupPermissions}} \ {{end}}{{if .Config.Entrypoint}}--entrypoint="{{range $i, $v := .Config.Entrypoint}}{{if $i}} {{end}}{{$v}}{{end}}" \ {{end}}{{with .HostConfig.LogConfig}}--log-driver={{printf "%q" .Type}} \ {{range $o, $v := .Config}}--log-opt {{$o}}={{printf "%q" $v}} \ {{end}}{{end}}{{with .HostConfig.RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}:{{.MaximumRetryCount}}{{end}}" \ -
efrecon revised this gist
Oct 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ docker run \ {{range $conf.Aliases}}--network-alias {{printf "%q" .}} {{end}} \ {{end}}{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from={{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.Binds}}--volume={{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.Mounts}}--mount type={{printf "%q" .Type}},src={{printf "%q" .Source}},target={{printf "%q" .Target}},ro={{.ReadOnly}}{{if .BindOptions}},bind-propagation={{printf "%q" .BindOptions.Propagation}}{{end}} \ {{end}}{{range $l, $v := .Config.Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{printf "%q" .}} \ -
efrecon revised this gist
Oct 10, 2019 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,17 +6,19 @@ docker run \ {{range $conf.Aliases}}--network-alias {{printf "%q" .}} {{end}} \ {{end}}{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from={{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.Binds}}--volume={{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.Mounts}}--mount type={{printf "%q" .Type}},src={{printf "%q" .Source}},tgt={{printf "%q" .Target}},ro={{.ReadOnly}}{{if .BindOptions}},bind-propagation={{printf "%q" .BindOptions.Propagation}}{{end}} \ {{end}}{{range $l, $v := .Config.Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{printf "%q" .}} \ {{end}}{{range $d := .HostConfig.Devices}}--device={{printf "%q" (index $d).PathOnHost}}:{{printf "%q" (index $d).PathInContainer}}:{{(index $d).CgroupPermissions}} \ {{end}}{{if .Config.Entrypoint}}--entrypoint="{{range $v := .Config.Entrypoint}}{{.}} {{end}}" \ {{end}}{{with .HostConfig.LogConfig}}--log-driver={{printf "%q" .Type}} \ {{range $o, $v := .Config}}--log-opt {{$o}}={{printf "%q" $v}} \ {{end}}{{end}}{{with .HostConfig.RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}:{{.MaximumRetryCount}}{{end}}" \ {{end}}{{if .Config.Tty}}-t \ {{end}}{{if .Config.OpenStdin}}-i \ {{end}}{{if not (.Config.AttachStdout)}}--detach=true \ {{end}}{{if .HostConfig.Init}}--init \ {{end}}{{if .HostConfig.Privileged}}--privileged \ {{end}}{{printf "%q" .Config.Image}} \ {{range .Config.Cmd}}{{printf "%q" .}} {{end}} -
efrecon revised this gist
Feb 20, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ docker run \ {{end}}{{range $v := .Config.Entrypoint}}--entrypoint={{printf "%q" .}} \ {{end}}{{with .HostConfig.LogConfig}}--log-driver={{printf "%q" .Type}} \ {{range $o, $v := .Config}}--log-opt {{$o}}={{printf "%q" $v}} \ {{end}}{{end}}{{with .HostConfig.RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}:{{.MaximumRetryCount}}{{end}}" \ {{end}}{{if .Config.Tty}}-t \ {{end}}{{if .Config.OpenStdin}}-i \ {{end}}{{if not (.Config.AttachStdout)}}--detach=true \ -
efrecon revised this gist
Feb 22, 2018 . 1 changed file with 15 additions and 14 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,22 @@ docker run \ --name={{.Name}} \ {{range $e := .Config.Env}}--env={{printf "%q" $e}} \ {{end}}{{range $p, $conf := .NetworkSettings.Ports}}{{with $conf}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \ {{end}}{{end}}{{range $n, $conf := .NetworkSettings.Networks}}{{with $conf}}--network {{printf "%q" $n}} \ {{range $conf.Aliases}}--network-alias {{printf "%q" .}} {{end}} \ {{end}}{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from={{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.Binds}}--volume={{printf "%q" .}} \ {{end}}{{range $l, $v := .Config.Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{printf "%q" .}} \ {{end}}{{range $d := .HostConfig.Devices}}--device={{printf "%q" (index $d).PathOnHost}}:{{printf "%q" (index $d).PathInContainer}}:{{(index $d).CgroupPermissions}} \ {{end}}{{range $v := .Config.Entrypoint}}--entrypoint={{printf "%q" .}} \ {{end}}{{with .HostConfig.LogConfig}}--log-driver={{printf "%q" .Type}} \ {{range $o, $v := .Config}}--log-opt {{$o}}={{printf "%q" $v}} \ {{end}}{{end}}{{with .HostConfig.RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}{{.MaximumRetryCount}}{{end}}" \ {{end}}{{if .Config.Tty}}-t \ {{end}}{{if .Config.OpenStdin}}-i \ {{end}}{{if not (.Config.AttachStdout)}}--detach=true \ {{end}}{{if .HostConfig.Privileged}}--privileged \ {{end}}{{printf "%q" .Config.Image}} \ {{range .Config.Cmd}}{{printf "%q" .}} {{end}} -
efrecon revised this gist
Jul 30, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,8 @@ docker run \ {{end}}{{range $l, $v := .Config.Labels}}--label "{{$l}}"="{{$v}}" \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{.}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{.}} \ {{end}}{{range $d := .HostConfig.Devices}}--device={{(index $d).PathOnHost}}:{{(index $d).PathInContainer}}:{{(index $d).CgroupPermissions}} \ {{end}}{{range $v := .Config.Entrypoint}}--entrypoint="{{.}}" \ {{end}}{{with .HostConfig.LogConfig}}--log-driver="{{.Type}}" \ {{range $o, $v := .Config}}--log-opt {{$o}}="{{$v}}" \ {{end}}{{end}}{{with .HostConfig.RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}{{.MaximumRetryCount}}{{end}}" \ @@ -17,4 +18,4 @@ docker run \ {{end}}{{if .HostConfig.Privileged}}--privileged \ {{end}}{{if .HostConfig.AutoRemove}}--rm \ {{end}}{{.Config.Image}} \ {{range .Config.Cmd}}{{.}} {{end}} -
efrecon revised this gist
Jun 30, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ docker run \ {{end}}{{range $p, $conf := .NetworkSettings.Ports}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \ {{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from="{{.}}" \ {{end}}{{range $v := .HostConfig.Binds}}--volume="{{.}}" \ {{end}}{{range $l, $v := .Config.Labels}}--label "{{$l}}"="{{$v}}" \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{.}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{.}} \ {{end}}{{with .Config.Entrypoint}}--entrypoint="{{.}}" \ -
efrecon revised this gist
Jun 28, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,5 +14,6 @@ docker run \ {{end}}{{if .Config.OpenStdin}}-i \ {{end}}{{if not (.Config.AttachStdout)}}--detach=true \ {{end}}{{if .HostConfig.Privileged}}--privileged \ {{end}}{{if .HostConfig.AutoRemove}}--rm \ {{end}}{{.Config.Image}} \ {{range .Config.Cmd}}{{.}} {{end}} -
efrecon revised this gist
Jun 28, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,12 @@ docker run \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{.}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{.}} \ {{end}}{{with .Config.Entrypoint}}--entrypoint="{{.}}" \ {{end}}{{with .HostConfig.LogConfig}}--log-driver="{{.Type}}" \ {{range $o, $v := .Config}}--log-opt {{$o}}="{{$v}}" \ {{end}}{{end}}{{with .HostConfig.RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}{{.MaximumRetryCount}}{{end}}" \ {{end}}{{if .Config.Tty}}-t \ {{end}}{{if .Config.OpenStdin}}-i \ {{end}}{{if not (.Config.AttachStdout)}}--detach=true \ {{end}}{{if .HostConfig.Privileged}}--privileged \ {{end}}{{.Config.Image}} \ {{range .Config.Cmd}}{{.}} {{end}} -
efrecon created this gist
Jun 28, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ docker run \ --name={{.Name}} \ {{range $e := .Config.Env}}--env="{{$e}}" \ {{end}}{{range $p, $conf := .NetworkSettings.Ports}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \ {{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from="{{.}}" \ {{end}}{{range $v := .HostConfig.Binds}}--volume="{{.}}" \ {{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{.}} \ {{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{.}} \ {{end}}{{with .Config.Entrypoint}}--entrypoint="{{.}}" \ {{end}}{{with .HostConfig.RestartPolicy}}--restart="{{.Name}}{{if eq .Name "on-failure"}}{{.MaximumRetryCount}}{{end}}" \ {{end}}{{if .Config.Tty}}-t \ {{end}}{{if .Config.OpenStdin}}-i \ {{end}}{{.Config.Image}} \ {{range .Config.Cmd}}{{.}} {{end}}