mirror of
https://github.com/Mexit/AlpDock.git
synced 2025-04-27 16:29:54 +03:00
Compare commits
16 commits
v3.20.0+20
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cce54a0ee7 | ||
![]() |
24e56fd8fe | ||
![]() |
e6aae4567c | ||
![]() |
55175688f7 | ||
![]() |
8c99e3e3a0 | ||
![]() |
9e5aa61e5a | ||
![]() |
3c7192f3fb | ||
![]() |
e055216863 | ||
![]() |
044db5031b | ||
![]() |
a6ce235cea | ||
![]() |
244ba9bd6e | ||
![]() |
240807b826 | ||
![]() |
7a8356ff1f | ||
![]() |
1ef1a34708 | ||
![]() |
3cdd8cbeef | ||
![]() |
d5444c420c |
6 changed files with 227 additions and 28 deletions
78
.github/workflows/build_iso.yml
vendored
78
.github/workflows/build_iso.yml
vendored
|
@ -1,29 +1,35 @@
|
||||||
env:
|
env:
|
||||||
version: v3.20
|
version: 3.21
|
||||||
|
|
||||||
name: Alpine ISO Builder
|
name: Alpine ISO Builder
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_ISOs:
|
build_ISOs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
container:
|
container:
|
||||||
image: alpine:3.20
|
image: alpine:3.21
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install software
|
- name: Install software
|
||||||
run: |
|
run: |
|
||||||
apk update
|
apk update
|
||||||
apk upgrade
|
apk upgrade
|
||||||
apk --no-cache add alpine-sdk build-base apk-tools alpine-conf \
|
apk --no-cache add alpine-sdk build-base apk-tools alpine-conf \
|
||||||
busybox fakeroot syslinux xorriso squashfs-tools sudo mtools \
|
busybox fakeroot syslinux xorriso squashfs-tools sudo mtools \
|
||||||
dosfstools grub-efi
|
dosfstools grub-efi github-cli
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
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
|
- name: Download aports
|
||||||
run: git clone --depth=1 https://gitlab.alpinelinux.org/alpine/aports.git
|
run: git clone --depth=1 https://gitlab.alpinelinux.org/alpine/aports.git
|
||||||
|
@ -31,22 +37,54 @@ jobs:
|
||||||
- name: Configure build keys
|
- name: Configure build keys
|
||||||
run: echo | abuild-keygen -i -a
|
run: echo | abuild-keygen -i -a
|
||||||
|
|
||||||
- name: Make ISO (${{ env.version }})
|
- name: Make ISO
|
||||||
run: |
|
run: |
|
||||||
chmod +x *.sh
|
chmod +x *.sh
|
||||||
mv *.sh aports/scripts/
|
cp *.sh aports/scripts/
|
||||||
|
cd aports/scripts/
|
||||||
|
|
||||||
aports/scripts/mkimage.sh \
|
./mkimage.sh \
|
||||||
--tag ${version} \
|
--tag ${version}-$(date +%y%m%d) \
|
||||||
--arch x86_64 \
|
--arch x86_64 \
|
||||||
--profile docker \
|
--profile docker \
|
||||||
--outdir . \
|
--outdir ../../ \
|
||||||
--repository https://dl-cdn.alpinelinux.org/alpine/${version}/main \
|
--repository https://dl-cdn.alpinelinux.org/alpine/v${version}/main \
|
||||||
--repository https://dl-cdn.alpinelinux.org/alpine/${version}/community
|
--repository https://dl-cdn.alpinelinux.org/alpine/v${version}/community
|
||||||
|
|
||||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
./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') }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
name: alpine_${{ env.version }}_iso
|
||||||
prerelease: false
|
path: ./*.iso
|
||||||
files: |
|
|
||||||
*.iso
|
- name: Release AlpDock ISO
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
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 "<br>\n\n**Full Changelog**: $commits" >> changelog.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
sha256sum *.iso > sha256sums.txt
|
||||||
|
|
||||||
|
gh release create ${{ github.ref_name }} \
|
||||||
|
--title ${{ github.ref_name }} \
|
||||||
|
--verify-tag \
|
||||||
|
--latest \
|
||||||
|
--notes-file changelog.txt \
|
||||||
|
*.iso sha256sums.txt
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# AlpDock
|
# [AlpDock](https://github.com/Mexit/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
|
### Root account
|
||||||
The root account does not have a password. To set it, type `passwd`.
|
The root account does not have a password. To set it, type `passwd`.
|
||||||
|
@ -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`)
|
By default, it is not possible to log into the root account via ssh: use `linux` account (pass: `linux`)
|
||||||
|
|
||||||
### Portainer
|
### 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:
|
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)
|
https://localhost:9443 (Replace localhost with the relevant IP address)
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
version="v3.20"
|
version="3.21"
|
||||||
|
|
||||||
HOSTNAME="$1"
|
HOSTNAME="$1"
|
||||||
if [ -z "$HOSTNAME" ]; then
|
if [ -z "$HOSTNAME" ]; then
|
||||||
|
@ -34,6 +34,17 @@ makefile root:root 0644 "$tmp"/etc/hostname <<EOF
|
||||||
$HOSTNAME
|
$HOSTNAME
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
makefile root:root 0644 "$tmp"/etc/motd <<EOF
|
||||||
|
|
||||||
|
Welcome to Alpine with docker preinstalled (Live ISO)!
|
||||||
|
|
||||||
|
DHCP is enabled on eth0.
|
||||||
|
To configure other interfaces run 'setup-interfaces' and then 'service networking restart' to apply settings.
|
||||||
|
|
||||||
|
Type 'alpdock-run-portainer' to run Portainer.
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
mkdir -p "$tmp"/etc/network
|
mkdir -p "$tmp"/etc/network
|
||||||
makefile root:root 0644 "$tmp"/etc/network/interfaces <<EOF
|
makefile root:root 0644 "$tmp"/etc/network/interfaces <<EOF
|
||||||
auto lo
|
auto lo
|
||||||
|
@ -61,8 +72,8 @@ util-linux
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
makefile root:root 0644 "$tmp"/etc/apk/repositories <<EOF
|
makefile root:root 0644 "$tmp"/etc/apk/repositories <<EOF
|
||||||
https://dl-cdn.alpinelinux.org/alpine/${version}/main
|
https://dl-cdn.alpinelinux.org/alpine/v${version}/main
|
||||||
https://dl-cdn.alpinelinux.org/alpine/${version}/community
|
https://dl-cdn.alpinelinux.org/alpine/v${version}/community
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p "$tmp"/etc/local.d
|
mkdir -p "$tmp"/etc/local.d
|
||||||
|
|
134
genapkovl-podman.sh
Normal file
134
genapkovl-podman.sh
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
#!/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 <<EOF
|
||||||
|
$HOSTNAME
|
||||||
|
EOF
|
||||||
|
|
||||||
|
makefile root:root 0644 "$tmp"/etc/motd <<EOF
|
||||||
|
|
||||||
|
Welcome to Alpine with podman preinstalled (Live ISO)!
|
||||||
|
|
||||||
|
DHCP is enabled on eth0.
|
||||||
|
To configure other interfaces run 'setup-interfaces' and then 'service networking restart' to apply settings.
|
||||||
|
|
||||||
|
Type 'alpdock-run-portainer' to run Portainer.
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p "$tmp"/etc/network
|
||||||
|
makefile root:root 0644 "$tmp"/etc/network/interfaces <<EOF
|
||||||
|
auto lo
|
||||||
|
iface lo inet loopback
|
||||||
|
|
||||||
|
auto eth0
|
||||||
|
iface eth0 inet dhcp
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p "$tmp"/etc/apk
|
||||||
|
makefile root:root 0644 "$tmp"/etc/apk/world <<EOF
|
||||||
|
alpine-base
|
||||||
|
bash-completion
|
||||||
|
coreutils
|
||||||
|
podman
|
||||||
|
findutils
|
||||||
|
openssh
|
||||||
|
procps
|
||||||
|
readline
|
||||||
|
sed
|
||||||
|
sudo
|
||||||
|
util-linux
|
||||||
|
EOF
|
||||||
|
|
||||||
|
makefile root:root 0644 "$tmp"/etc/apk/repositories <<EOF
|
||||||
|
https://dl-cdn.alpinelinux.org/alpine/v${version}/main
|
||||||
|
https://dl-cdn.alpinelinux.org/alpine/v${version}/community
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p "$tmp"/etc/local.d
|
||||||
|
makefile root:root 0744 "$tmp"/etc/local.d/set_bash.start <<EOF
|
||||||
|
#!/bin/ash
|
||||||
|
sed -i 's|root:/bin/ash|root:/bin/bash|' /etc/passwd
|
||||||
|
EOF
|
||||||
|
|
||||||
|
makefile root:root 0744 "$tmp"/etc/local.d/add_user.start <<EOF
|
||||||
|
#!/bin/ash
|
||||||
|
user="linux"
|
||||||
|
echo -e "\$user\n\$user" | adduser \$user -s /bin/bash
|
||||||
|
mkdir /etc/sudoers.d
|
||||||
|
echo "\$user ALL=(ALL) ALL" > /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 <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
podman volume create portainer_data
|
||||||
|
podman run \
|
||||||
|
--detach \
|
||||||
|
--volume=/var/run/podman/podman.sock:/var/run/docker.sock \
|
||||||
|
--volume=portainer_data:/data \
|
||||||
|
--publish=8000:8000 \
|
||||||
|
--publish=9443:9443 \
|
||||||
|
--restart=always \
|
||||||
|
--name=portainer \
|
||||||
|
portainer/portainer-ce:latest
|
||||||
|
EOF
|
||||||
|
|
||||||
|
rc_add devfs sysinit
|
||||||
|
rc_add dmesg sysinit
|
||||||
|
rc_add mdev sysinit
|
||||||
|
rc_add hwdrivers sysinit
|
||||||
|
rc_add modloop sysinit
|
||||||
|
|
||||||
|
rc_add hwclock boot
|
||||||
|
rc_add modules boot
|
||||||
|
rc_add sysctl boot
|
||||||
|
rc_add hostname boot
|
||||||
|
rc_add bootmisc boot
|
||||||
|
rc_add syslog boot
|
||||||
|
rc_add networking boot
|
||||||
|
rc_add local boot
|
||||||
|
|
||||||
|
rc_add podman default
|
||||||
|
rc_add sshd default
|
||||||
|
|
||||||
|
rc_add mount-ro shutdown
|
||||||
|
rc_add killprocs shutdown
|
||||||
|
rc_add savecache shutdown
|
||||||
|
|
||||||
|
tar -c -C "$tmp" etc usr| gzip -9n > $HOSTNAME.apkovl.tar.gz
|
|
@ -11,4 +11,5 @@ profile_docker() {
|
||||||
docker docker-bash-completion docker-cli-compose \
|
docker docker-bash-completion docker-cli-compose \
|
||||||
bash-completion procps util-linux readline findutils sed coreutils sudo e2fsprogs lvm2"
|
bash-completion procps util-linux readline findutils sed coreutils sudo e2fsprogs lvm2"
|
||||||
apkovl="genapkovl-docker.sh"
|
apkovl="genapkovl-docker.sh"
|
||||||
|
hostname="alpdock"
|
||||||
}
|
}
|
||||||
|
|
15
mkimg.podman.sh
Normal file
15
mkimg.podman.sh
Normal file
|
@ -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"
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue