Code Monkey home page Code Monkey logo

Comments (28)

maltfield avatar maltfield commented on June 3, 2024

One solution, of course, is to just have a "send debug log" button that does some background magic and uploads the debug logs to our server. I'm not a big fan of this approach, as I believe the user should be able to view (and obfuscate/redact as needed) the logs before sending it to us.

One option would be to dump it to a file and tell them where it is, but that sounds like a difficult UX.

Another option (that would only work if the output is a reasonable size) is to just open a window showing the whole log since the app last started. I think this is fine for now, but may need to be revisited at some time if the log grows to be too long (eg if it's longer than can fit in the clipboard on any of our target platforms)

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

So debug logging is setup in main.py here

buskill-app/src/main.py

Lines 54 to 60 in 7b7e1e8

logging.basicConfig(
filename = log_file_path,
filemode = 'a',
format = '%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
datefmt = '%H:%M:%S',
level = logging.DEBUG
)

It appears that, actually, I already am logging to a debug file in tempfile.gettempdir()

So all I need to do is add a menu item to the GUI drawer and fill a textarea with the contents of that file (assuming I can pull from it while it's open for writing)

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

See also https://stackoverflow.com/questions/72910245/how-to-get-log-file-path-from-logging-after-getlogger

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

See also https://stackoverflow.com/questions/72910372/how-to-get-all-previous-logs-written-during-current-run-python-logging

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

See also https://stackoverflow.com/questions/72920026/add-scrollbar-to-textinput-python-kivy

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I've mostly implemented this in the gui-debug-log branch

...But the problem is that sometimes the debug log is verrrry long, which causes kivy to lock-up. I thought the issue was doing read() on the file, but I think it's actually kivy itself when updating the TextInput.text

So the file read() itself takes < 0.05 seconds, but updating the TextInput can take up to 15 seconds -- during which time the app becomes unresponsive.

I've tried switching from a TextInput to a Label (just in-case it was some bug specific to a TextInput), but that caused a memory-allocation-related Segmentation Fault (overflow?)

 Exception: Unable to allocate memory for texture (size is -1575546592)
 Exception ignored in: 'kivy.graphics.texture.Texture.allocate'
 Exception: Unable to allocate memory for texture (size is -1575546592)
Segmentation fault

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

One solution would be to just grab the last ~100 KB of the file's contents (file_contents[-102400:]). In my tests this on my laptop this took about 0.5 seconds to update.

A better hack would be to try to get the whole file, but if it takes longer than 0.1 seconds then try to get the last half of the file. And if that takes >0.1 more seconds, then try to just get the last quarter of the file. And if that takes >0.1 seconds, then try to just get the last eighth of the file. Etc. This would be better for mobile UX.

TODO: see if there is any way to run the TextInput.text = some_really_long_string in an asynchronous background thread, or if (because it's kivy itself!) it necessarily blocks the kivy main loop, and there's nothing we can do about it

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

Apparently the solution to loading a huge amount of data in kivy is a RecycleView

This answer is amazing. Loading the file takes 0.3 seconds and loading the content in a RecycleView takes another 0.3 seconds. Huge improvement!

Unfortunately it makes the text not select-able, but the first link above has an example on how to make the text selectable. I'll look into that now.

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

The example of a SelectableLabel in a RecycleView just made the label itself selectable. So you couldn't just select the text inside the label, only whole lines. And I'm not sure if you'd be able to copy to the clipboard after selectiong (seemes doubtful). Anyway, this is not the UX we're looking for.

I think I'm going to fall-back on the TextInput with a subset of the data :/

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

See also https://stackoverflow.com/questions/72927741/kivy-read-only-textinput-but-with-ability-to-select-all-ctrla

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

Aw man, it looks like the latest Kivy release v2.1.0 (released 2022-03-06) includes:

[#7449]: TextInput: Fix readonly mode preventing using cursor keys, wrapping, and more
[#7642]: TextInput loading time optimization for large texts.

source: https://github.com/kivy/kivy/releases/tag/2.1.0

So at least these two pain-points could be fixed by upgrading.

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I did some tests with the latest version of Kivy (installed unsafely with pip) v 2.1.0. I found

  1. The speed of loading a ~3 MB file into a TextInput only marginally improved from Kivy v1.11.1 (~15 seconds) to v2.1.0 (~12 seconds)
  2. The select-all (ctrl+a) is totally fixed when the TextInput is set to readonly: True in Kivy v2.1.0 (while it totally doesn't work in Kivy v1.11.1)

I'm not going to upgrade the app's Kivy version at this time. For now I guess I'll just add a button to copy the entire contents of the Textinput to clipboard. At some point in the future I guess the user will get the ability to select-all with ctrl+a.

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

See also https://stackoverflow.com/questions/72930171/page-up-page-down-home-and-end-dont-work-in-kivy-scrollview

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

https://stackoverflow.com/questions/72935115/kivy-recycleview-of-labels-without-clipping-text-or-huge-spaces-between

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

This post on the kivy discussion board from August 2020 is trying to do exactly what I'm trying to do: display a large log file in kivy without locking-up the screen (so using RecycleView) such that the height of each line matches the content

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

Update: this is mostly done. I decided to go with RecycleView, so the text isn't selectable -- but I have a Copy Log Button. And I provide a "help" icon which (when clicked) opens a modal that tells the user the full path to the debug log file on disk. So I suppose that's the best happy-medium providing the user everything they need without making the UI slow & crappy.

I'm just finishing the documentation so I can point users to a very easy-to-follow guide (with screenshots) on how to send me their Debug Log

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I finished updating the documentation with instructions on how to get and submit the Debug Log.

Curiously it's building the docs named after the feature branch.

This link may die in the future. If that's the case, just replace gui-debug-log with stable

As another foreseeable issue is that users discover a bug while they are running an out-of-date software, I also provided very easy-to-follow docs on how to update the software in-app from the GUI

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I had an interesting back-and-forth with Gabriel Pettier (tshirtman) talking about why loading large text in a kivy TextInput is so awful, and how it could be optimized in the future, especially if using a monospace font like we are

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

Before merging into dev and then master, I'm testing it on all three platforms.

Tests of this build worked on MacOS

Tests of this build worked on Linux

Tests of this build worked on Windows

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

today this was merged into the main dev branch. I also split-off the "shutdown trigger" progress into a feature-specific branch and removed that code from the dev branch so this could be unblocked from merging into master

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I've tagged this as release v0.5.0

Tests of this build worked on Linux

Tests of this build worked on MacOS

Tests of this build worked on Windows 10

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I built it locally on linux and confirmed the hash matches the build from GitHub. It's reproducible!

user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ git clone --single-branch --branch v0.5.0 https://github.com/BusKill/buskill-app.git
Cloning into 'buskill-app'...
remote: Enumerating objects: 4696, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 4696 (delta 12), reused 10 (delta 10), pack-reused 4678
Receiving objects: 100% (4696/4696), 182.87 MiB | 2.00 MiB/s, done.
Resolving deltas: 100% (2537/2537), done.
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ ^C
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ ^C
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ ^C
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ ^C
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ cd buskill-app/
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64/buskill-app$ git branch -l
* v0.5.0
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64/buskill-app$ build/linux/debianWrapper.sh 
+ DOCKER_IMAGE_NAME=debian:buster-slim
...
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64/buskill-app$ sha256sum dist/*/*.AppImage
f064645d96503ef08579d1b93fe704f5bbb69d2250961953965bcd093830f45d  dist/buskill-lin-v0.5.0-x86_64/buskill-v0.5.0.AppImage
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64/buskill-app$ cd ..
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ wget https://github.com/BusKill/buskill-app/releases/download/2718834785_linux/buskill-lin-v0.5.0-x86_64.tbz
--2022-07-22 16:24:03--  https://github.com/BusKill/buskill-app/releases/download/2718834785_linux/buskill-lin-v0.5.0-x86_64.tbz
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/274360069/bddf2dc8-39cc-4bc1-8786-b019c76bf721?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220722T142450Z&X-Amz-Expires=300&X-Amz-Signature=ca4028195f31c4c859761438a8f2d68a15e562fea47bd48f9db99a1111f0199c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274360069&response-content-disposition=attachment%3B%20filename%3Dbuskill-lin-v0.5.0-x86_64.tbz&response-content-type=application%2Foctet-stream [following]
--2022-07-22 16:24:05--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/274360069/bddf2dc8-39cc-4bc1-8786-b019c76bf721?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220722T142450Z&X-Amz-Expires=300&X-Amz-Signature=ca4028195f31c4c859761438a8f2d68a15e562fea47bd48f9db99a1111f0199c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274360069&response-content-disposition=attachment%3B%20filename%3Dbuskill-lin-v0.5.0-x86_64.tbz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34173093 (33M) [application/octet-stream]
Saving to: ‘buskill-lin-v0.5.0-x86_64.tbz’

buskill-lin-v0.5.0- 100%[===================>]  32.59M  2.25MB/s    in 16s     

2022-07-22 16:24:24 (2.05 MB/s) - ‘buskill-lin-v0.5.0-x86_64.tbz’ saved [34173093/34173093]

user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ tar -xjf buskill-lin-v0.5.0-x86_64.tbz 
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ sha256sum */*.AppImage
f064645d96503ef08579d1b93fe704f5bbb69d2250961953965bcd093830f45d  buskill-lin-v0.5.0-x86_64/buskill-v0.5.0.AppImage
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ 

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I confirmed the authenticity and integrity of the Windows build from the GitHub Actions CI pipeline

user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ gpg --import ~/QubesIncoming/personal/buskill_prerelease.asc 
gpg: key BE75DB07E34AFBC1: "BusKill Pre-Releases Signing Key 2020.07 <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ gpg --list-keys pre-release
pub   rsa4096 2020-07-07 [SC] [expires: 2025-07-06]
      713D4A4960EE849BAE3B41BABE75DB07E34AFBC1
uid           [ unknown] BusKill Pre-Releases Signing Key 2020.07 <[email protected]>
sub   rsa4096 2020-07-07 [E] [expires: 2025-07-06]
sub   rsa4096 2020-07-07 [S] [expires: 2025-07-06]

user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ 

user@disp8186:~/Downloads/buskill-lin-v0.5.0-x86_64$ cd ..
user@disp8186:~/Downloads$ 

user@disp8186:~/Downloads$ curl --location --remote-name https://github.com/BusKill/buskill-app/releases/download/2718834785_windows/buskill-win-v0.5.0-x86_64.zip
curl --location --remote-name https://github.com/BusKill/buskill-app/releases/download/2718834785_windows/SHA256SUMS
curl --location --remote-name https://github.com/BusKill/buskill-app/releases/download/2718834785_windows/SHA256SUMS.asc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 31.7M  100 31.7M    0     0  1013k      0  0:00:32  0:00:32 --:--:-- 2000k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100    96  100    96    0     0     24      0  0:00:04  0:00:03  0:00:01    63
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100   833  100   833    0     0    210      0  0:00:03  0:00:03 --:--:--   574
user@disp8186:~/Downloads$ 

user@disp8186:~/Downloads$ gpg --verify SHA256SUMS.asc
gpg: assuming signed data in 'SHA256SUMS'
gpg: Signature made Fri 22 Jul 2022 03:24:41 PM CEST
gpg:                using RSA key 0B90809464D7B7A50E1871DE7DE9F38ADB5B1E8A
gpg: Good signature from "BusKill Pre-Releases Signing Key 2020.07 <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 713D 4A49 60EE 849B AE3B  41BA BE75 DB07 E34A FBC1
     Subkey fingerprint: 0B90 8094 64D7 B7A5 0E18  71DE 7DE9 F38A DB5B 1E8A
user@disp8186:~/Downloads$ 

user@disp8186:~/Downloads$ sha256sum -c SHA256SUMS
buskill-win-v0.5.0-x86_64.zip: OK
user@disp8186:~/Downloads$ 

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

And I confirmed the authenticity and integrity of the MacOS build from the GitHub Actions CI pipeline

user@disp8186:~/Downloads$ rm SHA256SUMS*
user@disp8186:~/Downloads$ wget https://github.com/BusKill/buskill-app/releases/download/2718834785_mac/buskill-mac-v0.5.0-x86_64.dmg
--2022-07-22 16:42:14--  https://github.com/BusKill/buskill-app/releases/download/2718834785_mac/buskill-mac-v0.5.0-x86_64.dmg
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/274360069/ad53884d-1802-4e89-b46c-757cfb5fea9f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220722T144301Z&X-Amz-Expires=300&X-Amz-Signature=eab851e9f666bb96b2256f4640053fccff634749675cddcd19bbc9c4cbb5795e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274360069&response-content-disposition=attachment%3B%20filename%3Dbuskill-mac-v0.5.0-x86_64.dmg&response-content-type=application%2Foctet-stream [following]
--2022-07-22 16:42:16--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/274360069/ad53884d-1802-4e89-b46c-757cfb5fea9f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220722T144301Z&X-Amz-Expires=300&X-Amz-Signature=eab851e9f666bb96b2256f4640053fccff634749675cddcd19bbc9c4cbb5795e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274360069&response-content-disposition=attachment%3B%20filename%3Dbuskill-mac-v0.5.0-x86_64.dmg&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18381864 (18M) [application/octet-stream]
Saving to: ‘buskill-mac-v0.5.0-x86_64.dmg’

buskill-mac-v0.5.0-x86_6 100%[===============================>]  17.53M  2.41MB/s    in 9.0s    

2022-07-22 16:42:28 (1.95 MB/s) - ‘buskill-mac-v0.5.0-x86_64.dmg’ saved [18381864/18381864]

user@disp8186:~/Downloads$ curl --location --remote-name https://github.com/BusKill/buskill-app/releases/download/2718834785_mac/SHA256SUMS
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100    96  100    96    0     0     24      0  0:00:04  0:00:03  0:00:01   113
user@disp8186:~/Downloads$ curl --location --remote-name https://github.com/BusKill/buskill-app/releases/download/2718834785_mac/SHA256SUMS.asc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100   833  100   833    0     0    212      0  0:00:03  0:00:03 --:--:--   975
user@disp8186:~/Downloads$ 

user@disp8186:~/Downloads$ gpg --verify SHA256SUMS.asc
gpg: assuming signed data in 'SHA256SUMS'
gpg: Signature made Fri 22 Jul 2022 03:33:46 PM CEST
gpg:                using RSA key 0B90809464D7B7A50E1871DE7DE9F38ADB5B1E8A
gpg: Good signature from "BusKill Pre-Releases Signing Key 2020.07 <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 713D 4A49 60EE 849B AE3B  41BA BE75 DB07 E34A FBC1
     Subkey fingerprint: 0B90 8094 64D7 B7A5 0E18  71DE 7DE9 F38A DB5B 1E8A
user@disp8186:~/Downloads$ 

user@disp8186:~/Downloads$ sha256sum -c SHA256SUMS
buskill-mac-v0.5.0-x86_64.dmg: OK
user@disp8186:~/Downloads$ 

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I created a digest file for the three confirmed releases and signed it with the main BusKill Release Signing Key and created a release for it with all the files:

This is now the latest release available 🎉 :

TODO: update the updates repo metadata on all 4x mirrors and test that in-app upgrading works

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I've finished updating the metadata (plus sig) on all 4x mirrors and confirmed they're all working

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

Unfortunately, in testing after the release I realized that I'm not actually getting the linux distro name and version. Apparently there's no good pythonic way to do this, but it looks like I can just get the contents of /etc/os-release most of the time

I did some quick tests in various OSes to see what this file would have

Debian

Debian's data is great, but it's missing the minor version

user@disp9953:~$ export DOCKER_CONTENT_TRUST=1
docker run --rm -it --entrypoint /bin/bash debian:stable-slim
NUnable to find image 'debian:stable-slim' locally
docker.io/library/debian@sha256:4e64d65e583c9f7b63a0c32960f8458d86d3a27a23e56387a8c0c5d0e3024033: Pulling from library/debian
fef637bd3b6c: Pull complete 
Digest: sha256:4e64d65e583c9f7b63a0c32960f8458d86d3a27a23e56387a8c0c5d0e3024033
Status: Downloaded newer image for debian@sha256:4e64d65e583c9f7b63a0c32960f8458d86d3a27a23e56387a8c0c5d0e3024033
Tagging debian@sha256:4e64d65e583c9f7b63a0c32960f8458d86d3a27a23e56387a8c0c5d0e3024033 as debian:stable-slim
root@5f0fc84ae0d5:/# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@5f0fc84ae0d5:/# 

Ubuntu

Ubuntu looks good too

user@disp9953:~$ docker run --rm -it --entrypoint /bin/bash ubuntu:latest
Unable to find image 'ubuntu:latest' locally
docker.io/library/ubuntu@sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9bf34594887c2c7ac: Pulling from library/ubuntu
405f018f9d1d: Pull complete 
Digest: sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9bf34594887c2c7ac
Status: Downloaded newer image for ubuntu@sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9bf34594887c2c7ac
Tagging ubuntu@sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9bf34594887c2c7ac as ubuntu:latest
root@e2b15618f049:/# cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@e2b15618f049:/# 

Fedora

Fedora is pretty good

user@disp9953:~$ docker run --rm -it --entrypoint /bin/bash fedora:latest
Unable to find image 'fedora:latest' locally
docker.io/library/fedora@sha256:cbf627299e327f564233aac6b97030f9023ca41d3453c497be2f5e8f7762d185: Pulling from library/fedora
e1deda52ffad: Pull complete 
Digest: sha256:cbf627299e327f564233aac6b97030f9023ca41d3453c497be2f5e8f7762d185
Status: Downloaded newer image for fedora@sha256:cbf627299e327f564233aac6b97030f9023ca41d3453c497be2f5e8f7762d185
Tagging fedora@sha256:cbf627299e327f564233aac6b97030f9023ca41d3453c497be2f5e8f7762d185 as fedora:latest
[root@2673743da0ea /]# cat /etc/os-release 
NAME="Fedora Linux"
VERSION="36 (Container Image)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Container Image)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=36
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=36
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Container Image"
VARIANT_ID=container
[root@2673743da0ea /]# 

CentOS

CentOS is also pretty good but lacking the minor version

user@disp9953:~$ docker run --rm -it --entrypoint /bin/bash centos:latest
Unable to find image 'centos:latest' locally
docker.io/library/centos@sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177: Pulling from library/centos
a1d0c7532777: Pull complete 
Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Status: Downloaded newer image for centos@sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Tagging centos@sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177 as centos:latest
[root@f5c884462d3c /]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
[root@f5c884462d3c /]# 

Arch

We can get the name but not the version in arch

user@disp9953:~$ docker run --rm -it --entrypoint /bin/bash archlinux:latest
Unable to find image 'archlinux:latest' locally
latest: Pulling from library/archlinux
8e7389294d1c: Pull complete 
7e3068154676: Pull complete 
Digest: sha256:3a527a8a777472e60c23cf7a610b4d082913a786254c002d1cafdcec7f6129d9
Status: Downloaded newer image for archlinux:latest
[root@58b38d2e9b43 /]# cat /etc/os-release 
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
VERSION_ID=TEMPLATE_VERSION_ID
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux-logo
[root@58b38d2e9b43 /]# 

Gentoo

Gentoo doesn't sign their docker images 🤦

user@disp9953:~$ export DOCKER_CONTENT_TRUST=1
user@disp9953:~$ docker run --rm -it --entrypoint /bin/bash gentoo/stage3:latest
docker: Error: remote trust data does not exist for docker.io/gentoo/stage3: notary.docker.io does not have trust data for docker.io/gentoo/stage3.
See 'docker run --help'.
user@disp9953:~$ 

from buskill-app.

maltfield avatar maltfield commented on June 3, 2024

I've added some better debug log output to log the platform type (OS) and version to the dev branch in the latest commits. This is not part of the release, but it will be in the next one. It's not full tested, but it should be fine.

I'm closing this feature request as done

from buskill-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.