Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ gnu-on-alpine and alpine-plus-plus: Two Lightweight Containers for Implementing GitHub Container Actions with Shell Scripting

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š gnu-on-alpine and alpine-plus-plus: Two Lightweight Containers for Implementing GitHub Container Actions with Shell Scripting


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

Introduction

The motivation of the gnu-on-alpine and alpine-plus-plus Docker containers is the implementation of GitHub Container Actions via shell scripting. They are built upon alpine to keep the image size small for fast loading within GitHub Actions, and both are preinstalled with bash, coreutils, findutils, and gawk; and alpine-plus-plus is additionally preinstalled with git.

Both gnu-on-alpine and alpine-plus-plus are multiplatform images supporting the following platforms:

  • linux/386
  • linux/amd64
  • linux/arm/v6
  • linux/arm/v7
  • linux/arm64
  • linux/ppc64le
  • linux/s390x

Table of Contents:

  • Introduction
  • Motivation
  • Docker Tags and Versioning Scheme
  • Installing
    • Docker Pull Command
    • Use as a base image in a Dockerfile
  • Learn More
  • Where You Can Find Me

Motivation

GitHub Actions can be implemented in a couple ways. The most common is with JavaScript. However, another way to implement a GitHub Action is as a container action. As a container action, you can use any language to implement the action, provided the container includes all of the tools that your action requires.

One simple approach is to use your favorite Linux distribution as the base image for your container, and to define the steps to install any tools that your action needs (e.g., compilers, interpreters, CLI tools, etc) within the Dockerfile of your action. The problem with that approach is that whenever a workflow of one of your users runs, the container for your action is built, which in this case includes installing the various tools that it needs.

A better approach that speeds up runs of your action is to use a base image that includes all of the tools that your action requires. This way, your Dockerfile only requires the steps necessary to copy the source of your action into the container and to set an entrypoint. Here is an example of the Dockerfile of one of my GitHub Actions (note this one doesn't use the containers that are the subject of this post):

FROM ghcr.io/cicirello/pyaction:4.16.0
COPY tidyjavadocs.py /tidyjavadocs.py
ENTRYPOINT ["/tidyjavadocs.py"]

Docker Tags and Versioning Scheme

I push images to both Docker Hub and the GitHub Container Registry with the following tags:

  • The tag latest indicates, well, the latest image.
  • Tags of the form MAJOR.MINOR.PATCH (such as 3.17.2) indicate the Semantic Version of the Alpine image used as the base.
  • Tags of the form MAJOR.MINOR (e.g., 3.17) correspond to the most recent patch level of the Alpine image used as the base. For example, if 3.17.2 is the latest release, then 3.17 maps to this as well.
  • Tags of the form MAJOR (e.g., 3) correspond to the most recent patch level of the Alpine image used as the base, with major corresponding major version. For example, if 3.17.2 is the latest release, then 3 maps to this as well.

I use GitHub's dependabot to monitor for updates to the base Alpine image.

Installing

The pre-built images are hosted on both Docker Hub and the GitHub Container Registry. You can use it in the following ways.

Docker Pull Command

Pull the latest images from Docker Hub with the following (or replace with tag of desired version):

docker pull cicirello/gnu-on-alpine:3.17.2

Or for alpine-plus-plus:

docker pull cicirello/alpine-plus-plus:3.17.2

Pull from the Github Container Registry with:

docker pull ghcr.io/cicirello/gnu-on-alpine:3.17.2

Or for alpine-plus-plus:

docker pull ghcr.io/cicirello/alpine-plus-plus:3.17.2

Use as a base image in a Dockerfile

Use as a base image in a Dockerfile (or replace with tag of desired version):

FROM cicirello/gnu-on-alpine:3.17.2

# The rest of your Dockerfile would go here.

Or for alpine-plus-plus:

FROM cicirello/alpine-plus-plus:3.17.2

# The rest of your Dockerfile would go here.

Or you can use as a base image (via the Github Container Registry) with:

FROM ghcr.io/cicirello/gnu-on-alpine:3.17.2

# The rest of your Dockerfile would go here.

Or for alpine-plus-plus:

FROM ghcr.io/cicirello/alpine-plus-plus:3.17.2

# The rest of your Dockerfile would go here.

Learn More

To learn more, consult the GitHub repositories:

GitHub logo cicirello / gnu-on-alpine

A lightweight docker image for shell scripting with GNU tools

gnu-on-alpine

A lightweight docker image for shell scripting with GNU tools (Alpine plus bash, coreutils, findutils, gawk)

Docker Hub Docker Image Version (latest by date) Docker Pulls
GitHub GitHub release (latest by date)
Image Stats Docker Image Size (latest by date)
Build Status build
License License
Support GitHub Sponsors Liberapay Ko-Fi

Summary

The gnu-on-alpine Docker image is designed to support shell scripting using GNU tools such as the bash shell, gawk, coreutils, and findutils, while keeping the image size relatively small. Alpine Linux is used as the base image. The gnu-on-alpine image adds bash, findutils, coreutils, and gawk on top of Alpine Linux.

Multiplatform Image

gnu-on-alpine has the following platforms available:

  • linux/386
  • linux/amd64
  • linux/arm/v6
  • linux/arm/v7
  • linux/arm64
  • linux/ppc64le
  • linux/s390x

Source Repository and Builds

The source repository is maintained on GitHub. The images are built on Github and pushed to Docker Hub, as well as the Github Container Registry using Github Actions.

Docker Tags and Versioning Scheme

Each image pushed to Docker Hub and the Github Container Registry is tagged as follows:

  • The tag latest indicatesโ€ฆ

GitHub logo cicirello / alpine-plus-plus

A lightweight docker image for shell scripting and git

alpine-plus-plus

A lightweight docker image for shell scripting and git (Alpine plus bash, coreutils, findutils, gawk, git)

Docker Hub Docker Image Version (latest by date) Docker Pulls
GitHub GitHub release (latest by date)
Image Stats Docker Image Size (latest by date)
Build Status build
License GitHub
Support GitHub Sponsors Liberapay Ko-Fi

Summary

The alpine-plus-plus Docker image is motivated by Github-actions implemented primarily with bash and shell utilities, but is also potentially applicable to any use-case where you primarily need bash and GNU tools like gawk, etc, as well as git, but also want to keep the image size relatively small. Alpine Linux is used as the base image. Alone, Alpine almost suits this purpose However, it lacks the bash shell, and commonly used GNU tools such as findutils, gawk, etc. It also lacks git. The alpine-plus-plus image adds git, bash, findutils, coreutils, and gawk on top of Alpine Linux.

Multiplatform Image

alpine-plus-plus has the following platforms available:

  • linux/386
  • linux/amd64
  • linux/arm/v6
  • linux/arm/v7
  • linux/arm64
  • linux/ppc64le
  • linux/s390x

Source Repository and Builds

The source repository is maintained on GitHubโ€ฆ

Where You Can Find Me

Follow me here on DEV:

Follow me on GitHub:

GitHub logo cicirello / cicirello

My GitHub Profile

Vincent A Cicirello

Vincent A. Cicirello

Sites where you can find me or my work
Web and social media Personal Website LinkedIn DEV Profile
Software development Github Maven Central PyPI Docker Hub
Publications Google Scholar ORCID DBLP ACM Digital Library IEEE Xplore ResearchGate arXiv

My bibliometrics

My GitHub Activity

If you want to generate the equivalent to the above for your own GitHub profile, check out the cicirello/user-statistician GitHub Action.




Or visit my website:

Vincent A. Cicirello - Professor of Computer Science

Vincent A. Cicirello - Professor of Computer Science at Stockton University - is a researcher in artificial intelligence, evolutionary computation, swarm intelligence, and computational intelligence, with a Ph.D. in Robotics from Carnegie Mellon University. He is an ACM Senior Member, IEEE Senior Member, AAAI Life Member, EAI Distinguished Member, and SIAM Member.

favicon cicirello.org
...



๐Ÿ“Œ Pushing container images to GitHub Container Registry with GitHub Actions


๐Ÿ“ˆ 45.77 Punkte

๐Ÿ“Œ Actions Project - Actions Builder & Actions SDK


๐Ÿ“ˆ 36.85 Punkte

๐Ÿ“Œ Conversational Actions overview - Actions Builder & Actions SDK


๐Ÿ“ˆ 36.85 Punkte

๐Ÿ“Œ Deploying a Vite app on GitHub Pages using GitHub Actions with GitHub Secrets


๐Ÿ“ˆ 34.94 Punkte

๐Ÿ“Œ Gitea is working on a built-in CI/CD tool called Gitea Actions (compatible with GitHub Actions syntax)


๐Ÿ“ˆ 32.12 Punkte

๐Ÿ“Œ actions-hottest๐Ÿš€: GitHub Actions for Commenting on Golang Unit Test Results in Pull Requests


๐Ÿ“ˆ 32.12 Punkte

๐Ÿ“Œ Sync GitHub repo and Hugging Face Space Repo with GitHub Actions


๐Ÿ“ˆ 29.19 Punkte

๐Ÿ“Œ Automate Docker Image Builds and Push to GitHub Registry Using GitHub Actions ๐Ÿ™


๐Ÿ“ˆ 29.19 Punkte

๐Ÿ“Œ How to Create a GitHub Profile Readme with GitHub Actions, Profile Trophy, and Custom Icons Badges


๐Ÿ“ˆ 29.19 Punkte

๐Ÿ“Œ Build an end-to-end MLOps pipeline using Amazon SageMaker Pipelines, GitHub, and GitHub Actions


๐Ÿ“ˆ 29.19 Punkte

๐Ÿ“Œ Best practices for Azure Container Instances (ACI) with GitHub Actions | Azure Friday


๐Ÿ“ˆ 29.02 Punkte

๐Ÿ“Œ heise+ | Wie Sie Container mit GitHub Actions automatisiert publizieren


๐Ÿ“ˆ 29.02 Punkte

๐Ÿ“Œ Lightweight Containers With Docker and WebAssembly


๐Ÿ“ˆ 28.29 Punkte

๐Ÿ“Œ The HyperX Pulsefire Haste is a lightweight mouse with a lightweight cost


๐Ÿ“ˆ 27.75 Punkte

๐Ÿ“Œ Security: Mehrere Probleme in osp-director-agent-container osp-director-operator-container und osp-director-downloader-container (Red Hat)


๐Ÿ“ˆ 27.57 Punkte

๐Ÿ“Œ Github launch ci/cd in Github Actions


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ GitHub ermรถglicht eigene Runner fรผr GitHub Actions


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ GitHub Actions being actively abused to mine cryptocurrency on GitHub servers


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ GitHub Actions: GitHub kรผndigt hรคrteres Vorgehen gegen Cryptominer an


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ GitHub Dependabot Now Alerts Developers On Vulnerable GitHub Actions


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ How to Test a GitHub Action with GitHub Actions


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ Bonus Tip: How to Use GitHub Actions to Test a GitHub Action Whose Output Must be Visually Inspected


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ Use GitHub Actions to Make Your GitHub Profile Dynamic


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ GitHub Actions CI/CD for React app hosted in GitHub Pages


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ How I Bulk Closed 1000+ GitHub Issues with GitHub Actions ๐Ÿš€


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ Deploy Nextjs app to github-pages with Github Actions


๐Ÿ“ˆ 27.39 Punkte

๐Ÿ“Œ Kata Containers 3's marriage of virtual machines and containers continues


๐Ÿ“ˆ 27.03 Punkte

๐Ÿ“Œ 5 Best Lightweight Linux Distributions for Running Containers


๐Ÿ“ˆ 26.49 Punkte

๐Ÿ“Œ Linux containers vs docker containers


๐Ÿ“ˆ 25.22 Punkte











matomo