From 240807b826395c3c04ae53c6a0cd3324a8a74b0c Mon Sep 17 00:00:00 2001 From: docxml Date: Mon, 2 Dec 2024 20:24:10 +0100 Subject: [PATCH 01/12] Typo README.md (#7) Typo markdown code --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 076be35..5e43948 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,6 @@ To configure other interfaces run `setup-interfaces` and then `service networkin By default, it is not possible to log into the root account via ssh: use `linux` account (pass: `linux`) ### Portainer -Type 'alpdock-run-portainer' to run Portainer. +Type `alpdock-run-portainer` to run Portainer. You can log into your Portainer Server by opening a web browser and going to: -https://localhost:9443 (Replace localhost with the relevant IP address) \ No newline at end of file +https://localhost:9443 (Replace localhost with the relevant IP address) From 244ba9bd6e399e938192f1dc97d71323de677538 Mon Sep 17 00:00:00 2001 From: MexIT Date: Fri, 6 Dec 2024 13:51:49 +0100 Subject: [PATCH 02/12] Alpine Linux updated to 3.21 --- .github/workflows/build_iso.yml | 8 +++----- genapkovl-docker.sh | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index 9d87b75..4141669 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -1,18 +1,16 @@ env: - version: v3.20 + version: v3.21 name: Alpine ISO Builder on: push: - tags: - - 'v*' jobs: build_ISOs: runs-on: ubuntu-24.04 container: - image: alpine:3.20 + image: alpine:3.21 steps: - name: Install software @@ -55,6 +53,7 @@ jobs: include-hidden-files: true release_ISOs: + if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-24.04 needs: build_ISOs steps: @@ -73,6 +72,5 @@ jobs: gh release create ${{ github.ref_name }} \ --verify-tag \ --latest \ - --draft \ --notes-file changelog.txt \ *.iso diff --git a/genapkovl-docker.sh b/genapkovl-docker.sh index d11bf03..1868fa7 100644 --- a/genapkovl-docker.sh +++ b/genapkovl-docker.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -alpinelinux="v3.20.3" +alpinelinux="v3.21.0" version="${alpinelinux%.*}" HOSTNAME="$1" From a6ce235ceac60edcfb8faed4119ea5b4bad05760 Mon Sep 17 00:00:00 2001 From: MexIT Date: Wed, 11 Dec 2024 19:12:17 +0100 Subject: [PATCH 03/12] minor: Improvements in changelog generation --- .github/workflows/build_iso.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index 4141669..2b5dee9 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -67,7 +67,7 @@ jobs: GH_TOKEN: ${{ github.token }} run: | echo -e "Changelog\n---------" > changelog.txt - git log --reverse --pretty=format:"%h %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD >> changelog.txt + git log --reverse --pretty=format:"- %h: %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD | egrep -v 'fix:|minor:|typo:' >> changelog.txt gh release create ${{ github.ref_name }} \ --verify-tag \ From 044db5031b0ef95cef67b1ebc7512b807fdd41fe Mon Sep 17 00:00:00 2001 From: MexIT Date: Thu, 19 Dec 2024 21:52:03 +0100 Subject: [PATCH 04/12] minor: improve release --- .github/workflows/build_iso.yml | 46 +++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index 2b5dee9..be8c3ff 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -1,5 +1,5 @@ env: - version: v3.21 + version: 3.21 name: Alpine ISO Builder @@ -19,7 +19,7 @@ jobs: apk upgrade apk --no-cache add alpine-sdk build-base apk-tools alpine-conf \ busybox fakeroot syslinux xorriso squashfs-tools sudo mtools \ - dosfstools grub-efi + dosfstools grub-efi github-cli - uses: actions/checkout@v4 with: @@ -31,10 +31,10 @@ jobs: - name: Configure build keys run: echo | abuild-keygen -i -a - - name: Make ISO (${{ env.version }}) + - name: Make ISO run: | chmod +x *.sh - mv *.sh aports/scripts/ + cp *.sh aports/scripts/ cd aports/scripts/ ./mkimage.sh \ @@ -42,30 +42,36 @@ jobs: --arch x86_64 \ --profile docker \ --outdir ../../ \ - --repository https://dl-cdn.alpinelinux.org/alpine/${version}/main \ - --repository https://dl-cdn.alpinelinux.org/alpine/${version}/community + --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/main \ + --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/community - - name: Upload files + - name: Change ISO name + run: | + date=$(date +%y%m%d) + for file in *.iso; do + if [[ -f "$file" ]]; then + filename="$file" + ver=$(echo "$filename" | grep -oE '[0-9]+\.[0-9]+') + if [ -n "$ver" ]; then + new_filename=$(echo "$filename" | sed "s/$ver/$ver-$date/") + mv "$filename" "$new_filename" + fi + fi + done + + - name: Upload ISO + if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} uses: actions/upload-artifact@v4 with: - name: files - path: . - include-hidden-files: true - - release_ISOs: - if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-24.04 - needs: build_ISOs - steps: - - name: Download files - uses: actions/download-artifact@v4 - with: - name: files + name: alpine_${{ env.version }}_iso + path: ./*.iso - name: Release AlpDock ISO + if: ${{ startsWith(github.ref, 'refs/tags/v') }} env: GH_TOKEN: ${{ github.token }} run: | + git config --global --add safe.directory . echo -e "Changelog\n---------" > changelog.txt git log --reverse --pretty=format:"- %h: %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD | egrep -v 'fix:|minor:|typo:' >> changelog.txt From e0552168639ef2194c015bd820c00d60fc1437fd Mon Sep 17 00:00:00 2001 From: MexIT Date: Fri, 20 Dec 2024 11:36:36 +0100 Subject: [PATCH 05/12] Update docker profile --- genapkovl-docker.sh | 7 +++---- mkimg.docker.sh | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/genapkovl-docker.sh b/genapkovl-docker.sh index 1868fa7..1ce2d45 100644 --- a/genapkovl-docker.sh +++ b/genapkovl-docker.sh @@ -1,7 +1,6 @@ #!/bin/sh -e -alpinelinux="v3.21.0" -version="${alpinelinux%.*}" +version="3.21" HOSTNAME="$1" if [ -z "$HOSTNAME" ]; then @@ -62,8 +61,8 @@ util-linux EOF makefile root:root 0644 "$tmp"/etc/apk/repositories < Date: Fri, 20 Dec 2024 12:13:03 +0100 Subject: [PATCH 06/12] Add iso with podman --- .github/workflows/build_iso.yml | 22 +++--- README.md | 4 +- genapkovl-podman.sh | 123 ++++++++++++++++++++++++++++++++ mkimg.podman.sh | 15 ++++ 4 files changed, 148 insertions(+), 16 deletions(-) create mode 100644 genapkovl-podman.sh create mode 100644 mkimg.podman.sh diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index be8c3ff..d6337e5 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -38,26 +38,20 @@ jobs: cd aports/scripts/ ./mkimage.sh \ - --tag ${version} \ + --tag ${version}-$(date +%y%m%d) \ --arch x86_64 \ --profile docker \ --outdir ../../ \ --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/main \ --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/community - - name: Change ISO name - run: | - date=$(date +%y%m%d) - for file in *.iso; do - if [[ -f "$file" ]]; then - filename="$file" - ver=$(echo "$filename" | grep -oE '[0-9]+\.[0-9]+') - if [ -n "$ver" ]; then - new_filename=$(echo "$filename" | sed "s/$ver/$ver-$date/") - mv "$filename" "$new_filename" - fi - fi - done + ./mkimage.sh \ + --tag ${version}-$(date +%y%m%d) \ + --arch x86_64 \ + --profile podman \ + --outdir ../../ \ + --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/main \ + --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/community - name: Upload ISO if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} diff --git a/README.md b/README.md index 5e43948..bcaa7a2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # AlpDock -Alpine Linux with docker preinstalled (Live Image) +Alpine Linux with `docker` and `podman` preinstalled (Live Images) -AlpDock includes only minimum amount of software needed to run Docker and SSH server. +AlpDock includes only minimum amount of software needed to run Docker, Podman and SSH server. ### Root account The root account does not have a password. To set it, type `passwd`. diff --git a/genapkovl-podman.sh b/genapkovl-podman.sh new file mode 100644 index 0000000..557d322 --- /dev/null +++ b/genapkovl-podman.sh @@ -0,0 +1,123 @@ +#!/bin/sh -e + +version="3.21" + +HOSTNAME="$1" +if [ -z "$HOSTNAME" ]; then + echo "usage: $0 hostname" + exit 1 +fi + +cleanup() { + rm -rf "$tmp" +} + +makefile() { + OWNER="$1" + PERMS="$2" + FILENAME="$3" + cat > "$FILENAME" + chown "$OWNER" "$FILENAME" + chmod "$PERMS" "$FILENAME" +} + +rc_add() { + mkdir -p "$tmp"/etc/runlevels/"$2" + ln -sf /etc/init.d/"$1" "$tmp"/etc/runlevels/"$2"/"$1" +} + +tmp="$(mktemp -d)" +trap cleanup EXIT + +mkdir -p "$tmp"/etc +makefile root:root 0644 "$tmp"/etc/hostname < /etc/sudoers.d/\$user && chmod 0440 /etc/sudoers.d/\$user +# Podman rootless support +modprobe tun +echo tun >> /etc/modules +echo \$user:100000:65536 >> /etc/subuid +echo \$user:100000:65536 >> /etc/subgid +EOF + +mkdir -p "$tmp"/usr/bin +makefile root:root 0755 "$tmp"/usr/bin/alpdock-run-portainer < $HOSTNAME.apkovl.tar.gz diff --git a/mkimg.podman.sh b/mkimg.podman.sh new file mode 100644 index 0000000..a76d72f --- /dev/null +++ b/mkimg.podman.sh @@ -0,0 +1,15 @@ +profile_podman() { + title="Podman" + desc="Alpine with docker, SSH and other utils preinstalled." + profile_base + profile_abbrev="podman" + image_ext="iso" + arch="aarch64 x86 x86_64 ppc64le riscv64 s390x" + output_format="iso" + kernel_addons="xtables-addons" + apks="$apks \ + podman \ + bash-completion procps util-linux readline findutils sed coreutils sudo e2fsprogs lvm2" + apkovl="genapkovl-podman.sh" + hostname="alpdock" +} From 9e5aa61e5a03e1e61e4c16c7e220f6336f3e670f Mon Sep 17 00:00:00 2001 From: MexIT Date: Fri, 20 Dec 2024 22:27:52 +0100 Subject: [PATCH 07/12] minor: Add full changelog to release --- .github/workflows/build_iso.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index d6337e5..806b238 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -66,8 +66,10 @@ jobs: GH_TOKEN: ${{ github.token }} run: | git config --global --add safe.directory . - echo -e "Changelog\n---------" > changelog.txt + echo "### Main changes:" > changelog.txt git log --reverse --pretty=format:"- %h: %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD | egrep -v 'fix:|minor:|typo:' >> changelog.txt + commits="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/$(git tag --sort=-v:refname | sed -n 2p)...$(git tag --sort=-v:refname | sed -n 1p)" + echo -e "
\n\n**Full Changelog**: $commits" >> changelog.txt gh release create ${{ github.ref_name }} \ --verify-tag \ From 8c99e3e3a0bcda9c450eefd34fab5824c9991844 Mon Sep 17 00:00:00 2001 From: MexIT Date: Sat, 21 Dec 2024 19:33:37 +0100 Subject: [PATCH 08/12] minor: Add AlpDock URL to README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bcaa7a2..9b141ac 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AlpDock +# [AlpDock](https://github.com/Mexit/AlpDock) Alpine Linux with `docker` and `podman` preinstalled (Live Images) AlpDock includes only minimum amount of software needed to run Docker, Podman and SSH server. From 55175688f791072df8128e9afad68679c7cf6aeb Mon Sep 17 00:00:00 2001 From: MexIT Date: Fri, 3 Jan 2025 19:09:13 +0100 Subject: [PATCH 09/12] minor: Release: add sha256sums and release title --- .github/workflows/build_iso.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index 806b238..bc19873 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -71,8 +71,11 @@ jobs: commits="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/$(git tag --sort=-v:refname | sed -n 2p)...$(git tag --sort=-v:refname | sed -n 1p)" echo -e "
\n\n**Full Changelog**: $commits" >> changelog.txt + sha256sum *.iso > sha256sums.txt + gh release create ${{ github.ref_name }} \ + --title ${{ github.ref_name }} \ --verify-tag \ --latest \ --notes-file changelog.txt \ - *.iso + *.iso sha256sums.txt From e6aae4567c9e7940283dbd5f7b2811ce08117202 Mon Sep 17 00:00:00 2001 From: MexIT Date: Fri, 3 Jan 2025 20:47:09 +0100 Subject: [PATCH 10/12] Update /etc/motd --- genapkovl-docker.sh | 11 +++++++++++ genapkovl-podman.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/genapkovl-docker.sh b/genapkovl-docker.sh index 1ce2d45..8fd765b 100644 --- a/genapkovl-docker.sh +++ b/genapkovl-docker.sh @@ -34,6 +34,17 @@ makefile root:root 0644 "$tmp"/etc/hostname < Date: Sun, 5 Jan 2025 16:44:28 +0100 Subject: [PATCH 11/12] minor: Update Releases --- .github/workflows/build_iso.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index bc19873..800ef0f 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -66,10 +66,15 @@ jobs: GH_TOKEN: ${{ github.token }} run: | git config --global --add safe.directory . - echo "### Main changes:" > changelog.txt - git log --reverse --pretty=format:"- %h: %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD | egrep -v 'fix:|minor:|typo:' >> changelog.txt - commits="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/$(git tag --sort=-v:refname | sed -n 2p)...$(git tag --sort=-v:refname | sed -n 1p)" - echo -e "
\n\n**Full Changelog**: $commits" >> changelog.txt + git fetch --tags --force + if git cat-file -t ${{ github.ref_name }} | grep -q '^tag$'; then + git tag -n ${{ github.ref_name }} --format="### %(subject)" > changelog.txt + else + echo "### Main changes:" > changelog.txt + git log --reverse --pretty=format:"- %h: %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD | egrep -v 'fix:|minor:|typo:' >> changelog.txt + commits="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/$(git tag --sort=-v:refname | sed -n 2p)...$(git tag --sort=-v:refname | sed -n 1p)" + echo -e "
\n\n**Full Changelog**: $commits" >> changelog.txt + fi sha256sum *.iso > sha256sums.txt From cce54a0ee72b0749dc8dc13a6b185fe7db5582d7 Mon Sep 17 00:00:00 2001 From: MexIT Date: Sun, 5 Jan 2025 18:16:05 +0100 Subject: [PATCH 12/12] fix: Fix git tags --- .github/workflows/build_iso.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index 800ef0f..b273cda 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -25,6 +25,12 @@ jobs: with: fetch-depth: 0 + - name: Fetch missing git tags + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + run: | + git config --global --add safe.directory . + git fetch --tags --force + - name: Download aports run: git clone --depth=1 https://gitlab.alpinelinux.org/alpine/aports.git @@ -65,8 +71,6 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - git config --global --add safe.directory . - git fetch --tags --force if git cat-file -t ${{ github.ref_name }} | grep -q '^tag$'; then git tag -n ${{ github.ref_name }} --format="### %(subject)" > changelog.txt else