From 03143598e90340628ef9480667e0fbff53c33b2b Mon Sep 17 00:00:00 2001 From: Tommaso Melacarne <53786619+PolpOnline@users.noreply.github.com> Date: Thu, 24 Apr 2025 04:15:39 +0200 Subject: [PATCH 1/3] Add .deb package release configuration Currently untested. Closes #636 --- .goreleaser.yml | 108 ++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 58 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 232c385c..63c727db 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -32,6 +32,16 @@ builds: - 386 ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.buildSource=snap + - id: deb + goos: + - linux + goarch: + - amd64 + - arm + - arm64 + - 386 + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.buildSource=deb archives: - builds: @@ -45,6 +55,9 @@ archives: format_overrides: - goos: windows format: zip + - builds: + - deb + format: deb checksum: name_template: "checksums.txt" @@ -72,61 +85,40 @@ brews: # Your app's description. # Default is empty. description: "A simple terminal UI for docker, written in Go" -#snapcrafts: -# - builds: -# - snap -# -# replacements: -# linux: Linux -# 386: x86 -# amd64: x86_64 -# -# # Wether to publish the snap to the snapcraft store. -# # Remember you need to `snapcraft login` first. -# # Defaults to false. -# publish: false -# -# # Single-line elevator pitch for your amazing snap. -# # 79 char long at most. -# summary: The lazier way to manage everything docker -# -# # This the description of your snap. You have a paragraph or two to tell the -# # most important story about your snap. Keep it under 100 words though, -# # we live in tweetspace and your description wants to look good in the snap -# # store. -# description: 'A simple terminal UI for docker, written in Go' -# -# # A guardrail to prevent you from releasing a snap to all your users before -# # it is ready. -# # `devel` will let you release only to the `edge` and `beta` channels in the -# # store. `stable` will let you release also to the `candidate` and `stable` -# # channels. More info about channels here: -# # https://snapcraft.io/docs/reference/channels -# # TODO: reset to `stable` when we've been manually reviewed: https://forum.snapcraft.io/t/request-for-classic-confinement-for-lazydocker/12155 -# grade: devel -# -# # Snaps can be setup to follow three different confinement policies: -# # `strict`, `devmode` and `classic`. A strict confinement where the snap -# # can only read and write in its own namespace is recommended. Extra -# # permissions for strict snaps can be declared as `plugs` for the app, which -# # are explained later. More info about confinement here: -# # https://snapcraft.io/docs/reference/confinement -# confinement: classic -# -# # Your app's license, based on SPDX license expressions: https://spdx.org/licenses -# # Default is empty. -# license: MIT -# -# # # Each binary built by GoReleaser is an app inside the snap. In this section -# # # you can declare extra details for those binaries. It is optional. -# # apps: -# -# # # The name of the app must be the same name as the binary built or the snapcraft name. -# # lazydocker: -# -# # # If your app requires extra permissions to work outside of its default -# # # confined space, declare them here. -# # # You can read the documentation about the available plugs and the -# # # things they allow: -# # # https://snapcraft.io/docs/reference/interfaces. -# # plugs: [] + +nfpms: + - id: deb + package_name: lazydocker + license: MIT + maintainer: "Jesse Duffield " + vendor: "Jesse Duffield" + homepage: "https://github.com/jesseduffield/lazydocker" + description: "A simple terminal UI for docker, written in Go" + formats: + - deb + dependencies: + - docker + - docker-compose + +snapcrafts: + - name: lazydocker + summary: A simple terminal UI for docker, written in Go + description: A simple terminal UI for docker, written in Go + confinement: strict + grade: stable + apps: + lazydocker: + command: lazydocker + plugs: + - network + - network-bind + - docker + parts: + lazydocker: + source: . + plugin: go + go-importpath: github.com/jesseduffield/lazydocker + build-snaps: + - go + build-packages: + - git From 9258b8f0a2161a416d534a09e39e093a143c03b7 Mon Sep 17 00:00:00 2001 From: Tommaso Melacarne <53786619+PolpOnline@users.noreply.github.com> Date: Thu, 24 Apr 2025 04:17:57 +0200 Subject: [PATCH 2/3] Keep the old snapcraft config --- .goreleaser.yml | 80 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 63c727db..760906de 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -100,25 +100,61 @@ nfpms: - docker - docker-compose -snapcrafts: - - name: lazydocker - summary: A simple terminal UI for docker, written in Go - description: A simple terminal UI for docker, written in Go - confinement: strict - grade: stable - apps: - lazydocker: - command: lazydocker - plugs: - - network - - network-bind - - docker - parts: - lazydocker: - source: . - plugin: go - go-importpath: github.com/jesseduffield/lazydocker - build-snaps: - - go - build-packages: - - git +#snapcrafts: +# - builds: +# - snap +# +# replacements: +# linux: Linux +# 386: x86 +# amd64: x86_64 +# +# # Wether to publish the snap to the snapcraft store. +# # Remember you need to `snapcraft login` first. +# # Defaults to false. +# publish: false +# +# # Single-line elevator pitch for your amazing snap. +# # 79 char long at most. +# summary: The lazier way to manage everything docker +# +# # This the description of your snap. You have a paragraph or two to tell the +# # most important story about your snap. Keep it under 100 words though, +# # we live in tweetspace and your description wants to look good in the snap +# # store. +# description: 'A simple terminal UI for docker, written in Go' +# +# # A guardrail to prevent you from releasing a snap to all your users before +# # it is ready. +# # `devel` will let you release only to the `edge` and `beta` channels in the +# # store. `stable` will let you release also to the `candidate` and `stable` +# # channels. More info about channels here: +# # https://snapcraft.io/docs/reference/channels +# # TODO: reset to `stable` when we've been manually reviewed: https://forum.snapcraft.io/t/request-for-classic-confinement-for-lazydocker/12155 +# grade: devel +# +# # Snaps can be setup to follow three different confinement policies: +# # `strict`, `devmode` and `classic`. A strict confinement where the snap +# # can only read and write in its own namespace is recommended. Extra +# # permissions for strict snaps can be declared as `plugs` for the app, which +# # are explained later. More info about confinement here: +# # https://snapcraft.io/docs/reference/confinement +# confinement: classic +# +# # Your app's license, based on SPDX license expressions: https://spdx.org/licenses +# # Default is empty. +# license: MIT +# +# # # Each binary built by GoReleaser is an app inside the snap. In this section +# # # you can declare extra details for those binaries. It is optional. +# # apps: +# +# # # The name of the app must be the same name as the binary built or the snapcraft name. +# # lazydocker: +# +# # # If your app requires extra permissions to work outside of its default +# # # confined space, declare them here. +# # # You can read the documentation about the available plugs and the +# # # things they allow: +# # # https://snapcraft.io/docs/reference/interfaces. +# # plugs: [] From 8bd7ee36d636be1a823cb72c0feec8c8ba98fa60 Mon Sep 17 00:00:00 2001 From: Tommaso Melacarne <53786619+PolpOnline@users.noreply.github.com> Date: Thu, 24 Apr 2025 04:30:43 +0200 Subject: [PATCH 3/3] Add instructions for installing `.deb` package in `README.md` --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 0af77059..67dc1e32 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,15 @@ yay -S lazydocker echo "alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /yourpath/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'" >> ~/.zshrc ``` +### `.deb` Package + +You can also install `lazydocker` using a `.deb` package. This allows you to easily add it to any deb-based distribution, including Ubuntu. + +To do that, just download the latest `.deb` package from the releases page and install the package using `dpkg`: + +```sh +sudo dpkg -i lazydocker__amd64.deb +``` For development, you can build the image using: