From 76c0d1eb9d8377e999a39aea972a003bbe98b521 Mon Sep 17 00:00:00 2001 From: quietsy Date: Sun, 14 Apr 2024 22:56:25 +0300 Subject: [PATCH] Add how to get support --- docs/assets/run.tpl | 148 +++++++++++++++++++++++++++++ docs/general/.pages | 1 + docs/general/how-to-get-support.md | 18 ++++ 3 files changed, 167 insertions(+) create mode 100644 docs/assets/run.tpl create mode 100644 docs/general/how-to-get-support.md diff --git a/docs/assets/run.tpl b/docs/assets/run.tpl new file mode 100644 index 000000000..e47dcfd92 --- /dev/null +++ b/docs/assets/run.tpl @@ -0,0 +1,148 @@ +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 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}} + --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}} + {{- if index . "ExposedPorts"}} + {{- range $p, $conf := .ExposedPorts}} + --expose {{printf "%q" $p}} \ + {{- end}} + {{- end}} + {{- if .User}} + --user {{printf "%q" .User}} \ + {{- 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}} \ No newline at end of file diff --git a/docs/general/.pages b/docs/general/.pages index f594e067e..a08294d3f 100644 --- a/docs/general/.pages +++ b/docs/general/.pages @@ -9,3 +9,4 @@ nav: - volumes.md - fleet.md - swag.md + - how-to-get-support.md diff --git a/docs/general/how-to-get-support.md b/docs/general/how-to-get-support.md new file mode 100644 index 000000000..6839c5814 --- /dev/null +++ b/docs/general/how-to-get-support.md @@ -0,0 +1,18 @@ +# How to get support + +1. Join our [discord server](https://discord.gg/YWrKVTn), read our [support policy](../misc/support-policy.md), and read the description of each channel before asking for support. +2. SSH to your server and run the following command to create an alias that gathers the information we require: + ```bash + alias lsiosupport='function _lsiosupport(){ uname -a > lsiosupport.txt; docker -v >> lsiosupport.txt; cat /etdc/os-release >> lsiosupport.txt; docker inspect --format "$(wget -qO- https://docs.linuxserver.io/assets/run.tpl)" $1 >> lsiosupport.txt; docker logs $1 >> lsiosupport.txt; }; _lsiosupport' + ``` + The alias gathers the following information: OS details, docker version, run command, and container logs. +3. Execute the alias with a container name: + ```bash + lsiosupport + ``` + Add `sudo` in the beginning if your user can't access docker. +4. A file called `lsiosupport.txt` will be created in the current folder, open it with a text editor. +5. Redact sensitive information such as: passwords, domains, emails, personal information, etc. + **Don't redact information we need for troubleshooting such as: IPs, volumes, local paths, etc.** +6. Upload the file to a pastebin like [PrivateBin](https://privatebin.net/) or [Gist](https://gist.github.com/). +7. Post the link along with a detailed description of your issue in the appropriate discord support channel. \ No newline at end of file