diff --git a/.forgejo/workflows/build-fedora-40.yml b/.forgejo/workflows/build-fedora-40.yml new file mode 100644 index 0000000..387bb02 --- /dev/null +++ b/.forgejo/workflows/build-fedora-40.yml @@ -0,0 +1,38 @@ + +$schema: https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/github-workflow.json + +on: + push: + branches: ['master'] + paths: + - "fedora-40/**" + - "fedora-40-minimal/**" + - "shared/**" + - ".forgejo/workflows/build-fedora-40.yml" + schedule: + - cron: "0 0 * * 3" # Every Thursday 00:00 + + +jobs: + build: + runs-on: fedora-40 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version-file: 'package.json' + - name: Fulfill Package Manager Cache + run: dnf makecache -y --releasever 40 + - name: Sign in to Image Index + run: buildah login code.lightstands.xyz --username ${{ env.GITHUB_ACTOR }} --password ${{ secrets.PUBLICATION_TOKEN }} + - name: Build Minimal Images + run: DNF_CACHE_PATH=/var/cache/dnf bun shared/build-image.ts code.lightstands.xyz/standcoded/fedora-minimal:40 fedora-40-minimal arm64 + - name: Push Minimal Images + run: buildah manifest push code.lightstands.xyz/standcoded/fedora-minimal:40 --all + - name: Build Complete Images + run: DNF_CACHE_PATH=/var/cache/dnf bun shared/build-image.ts code.lightstands.xyz/standcoded/fedora:40 fedora-40 arm64 + - name: Push Complete Images + run: buildah manifest push code.lightstands.xyz/standcoded/fedora:40 --all + diff --git a/.forgejo/workflows/build-fedora-41.yml b/.forgejo/workflows/build-fedora-41.yml index 644f62a..b84c5d8 100644 --- a/.forgejo/workflows/build-fedora-41.yml +++ b/.forgejo/workflows/build-fedora-41.yml @@ -1,3 +1,6 @@ + +$schema: https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/github-workflow.json + on: push: branches: ['master'] @@ -12,7 +15,7 @@ on: jobs: build: - runs-on: fedora-41 + runs-on: fedora-40 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/bun.lockb b/bun.lockb index 8a9a81f..e110007 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/fedora-40-minimal/Containerfile b/fedora-40-minimal/Containerfile new file mode 100644 index 0000000..0b85597 --- /dev/null +++ b/fedora-40-minimal/Containerfile @@ -0,0 +1,19 @@ +FROM fedora:40 + +RUN sh /imgbuild/fedora/instpkgs-minimal.sh + +# We don't clean up dnf cache since user may want to install packages for their use + +ADD containers.conf /etc/containers/ + +RUN sh /imgbuild/configure-nested-container.sh + +VOLUME /var/lib/containers +VOLUME /home/action/.local/share/containers + +# Set up environment variables to note that this is +# not starting with usernamespace and default to +# isolate the filesystem with chroot. +ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot + +ENTRYPOINT [ "/bin/bash" ] diff --git a/fedora-40-minimal/README.md b/fedora-40-minimal/README.md new file mode 100644 index 0000000..67a10a8 --- /dev/null +++ b/fedora-40-minimal/README.md @@ -0,0 +1,64 @@ +# fedora-minimal:40 + +```yaml +container: + image: code.lightstands.xyz/standcoded/fedora-minimal:40 +``` + +## Included Softwares + +### General + +- coreutils +- bash +- aria2 +- jq +- yq +- zstd +- brotil +- sqlite + +### Version Control + +- git +- git-lfs +- git-ftp + +### Container Management + +- podman +- buildah +- fuse-overlayfs + +### NodeJS + +- nodejs +- nodejs-npm + +### Python + +- python3 +- python3-devel +- python3-pip +- pipx + +### Perl + +- perl +- perl-CPAN + +### Ruby + +- ruby +- rubygems + +### C + +- clang +- gcc + +## Additional Configuration + +### Building Container Images + +This images configured buildah to be correctly run under a container. You can use [The workflow of this project](../.forgejo/workflows/build-fedora-40.yml) as an example. diff --git a/fedora-40-minimal/containers.conf b/fedora-40-minimal/containers.conf new file mode 100644 index 0000000..0bf45cd --- /dev/null +++ b/fedora-40-minimal/containers.conf @@ -0,0 +1,2 @@ +[engine] +cgroup_manager = "cgroupfs" diff --git a/fedora-40/Containerfile b/fedora-40/Containerfile new file mode 100644 index 0000000..da54e7a --- /dev/null +++ b/fedora-40/Containerfile @@ -0,0 +1,23 @@ +FROM code.lightstands.xyz/standcoded/fedora-minimal:40 + +RUN dnf install -y --setopt install_weak_deps=False sqlite-devel binutils + +RUN dnf install -y --setopt install_weak_deps=False nodejs-devel poetry perl-devel ruby-devel + +RUN dnf install -y --setopt install_weak_deps=False php php-devel composer + +RUN dnf install -y --setopt install_weak_deps=False java-1.8.0-openjdk java-1.8.0-openjdk-devel + +RUN dnf install -y --setopt install_weak_deps=False java-11-openjdk java-11-openjdk-devel + +RUN dnf install -y --setopt install_weak_deps=False java-17-openjdk java-17-openjdk-devel + +RUN dnf install -y --setopt install_weak_deps=False java-21-openjdk java-21-openjdk-devel + +RUN dnf install -y --setopt install_weak_deps=False qemu-user-static qemu-user-binfmt + +RUN dnf install -y --setopt install_weak_deps=False bison flex + +RUN dnf group install -y --setopt install_weak_deps=False "C Development Tools and Libraries" + +RUN npm -g install corepack diff --git a/fedora-40/README.md b/fedora-40/README.md new file mode 100644 index 0000000..fd25029 --- /dev/null +++ b/fedora-40/README.md @@ -0,0 +1,90 @@ +# fedora:40 + +```yaml +container: + image: code.lightstands.xyz/standcoded/fedora:40 +``` + +## Included Softwares + +### General + +- coreutils +- bash +- aria2 +- jq +- yq +- zstd +- brotil +- sqlite +- sqlite-devel +- binutils + +### Version Control + +- git +- git-lfs +- git-ftp + +### Container Management + +- podman +- buildah +- fuse-overlayfs +- qemu-user-static +- qemu-user-binfmt + +### NodeJS + +- nodejs +- nodejs-npm +- nodejs-devel +- corepack + +### Python + +- python3-devel +- python3-pip +- pipx +- poetry + +### Perl + +- perl +- perl-CPAN +- perl-devel + +### Ruby + +- ruby +- rubygems +- ruby-devel + +### C + +- clang +- gcc +- bison +- flex +- "C Development Tools and Libraries" + +### PHP + +- php +- php-devel +- composer + +### Java + +| Version | Packages | +| - | - | +| 1.8.0 | java-1.8.0-openjdk, java-1.8.0-openjdk-devel | +| 11 | java-11-openjdk, java-11-openjdk-devel | +| 17 | java-17-openjdk, java-17-openjdk-devel | +| 21 | java-21-openjdk, java-21-openjdk-devel | + +## Additional Configuration + +### Building Container Images + +This images configured buildah to be correctly run under a container. You can use [The workflow of this project](../.forgejo/workflows/build-fedora-40.yml) as an example. diff --git a/fedora-41/Containerfile b/fedora-41/Containerfile index 16529f3..2fd4651 100644 --- a/fedora-41/Containerfile +++ b/fedora-41/Containerfile @@ -1,4 +1,4 @@ -FROM localhost/runner-images/fedora-minimal:41 +FROM code.lightstands.xyz/standcoded/fedora-minimal:41 RUN dnf install -y --setopt install_weak_deps=False sqlite-devel binutils diff --git a/package.json b/package.json index 4e2a6f6..42d98da 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "@types/bun": "latest" }, "peerDependencies": { - "typescript": "^5.7.2" + "typescript": "^5.0.0" }, "packageManager": "bun@1.1.36" } \ No newline at end of file diff --git a/shared/build-image.ts b/shared/build-image.ts index 14979fc..7d1775e 100644 --- a/shared/build-image.ts +++ b/shared/build-image.ts @@ -7,10 +7,6 @@ const dirName = process.argv[3]; const arches = process.argv[4].split(","); const pathToDnfCache = process.env["DNF_CACHE_PATH"]; -const stag = tag.split('/'); -const imageName = stag[stag.length - 1]; -const tempTag = `localhost/runner-images/${imageName}`; - await $`buildah manifest create ${tag}`; for (const arch of arches) { await $`buildah build --arch ${arch} \ @@ -19,5 +15,3 @@ for (const arch of arches) { --manifest ${tag} \ --volume ${sharedDir}:/imgbuild:z ${dirName}`; } - -await $`buildah tag ${tag} ${tempTag}`;