Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 71 additions & 46 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,91 @@
name: Docker
name: "Docker"

on:
workflow_dispatch:

push:
branches: [master]
branches: ["master"]

permissions:
contents: read

jobs:
docker:
runs-on: ubuntu-latest
test:
name: "Test (${{ matrix.version }})"
runs-on: "ubuntu-latest"
strategy:
matrix:
include:
#- version: "3.1"
#- version: "3.2"
#- version: "3.3"
#- version: "3.4"
#- version: "3.5"
#- version: "3.6"
- version: "3.7"
- version: "3.8"
- version: "3.9"
- version: "3.10"
- version: "3.11"
- version: "3.12"
- version: "3.13"
- version: "3.14"
- version: "3.15"
- version: "3.16"
- version: "3.17"
- version: "3.18"
- version: "3.19"
- version: "3.20"
- version: "3.21"
- version: "3.22"
- version: "edge"

version: ["3.22", "3.21", "edge"]
fail-fast: false

name: Docker (dockette/alpine:${{ matrix.version }})

steps:
- name: Checkout
- name: "Checkout"
uses: actions/checkout@v4

- name: Login to DockerHub
uses: docker/login-action@v3
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3

- name: "Build image"
uses: docker/build-push-action@v6
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
context: "${{ matrix.version }}"
load: true
tags: "dockette/alpine:${{ matrix.version }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: "Test image"
run: "make test VERSION=${{ matrix.version }}"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
build:
name: "Build (${{ matrix.version }})"
needs: ["test"]
strategy:
matrix:
version:
#- "3.1"
#- "3.2"
#- "3.3"
#- "3.4"
#- "3.5"
#- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.15"
- "3.16"
- "3.17"
- "3.18"
- "3.19"
- "3.20"
- "3.21"
- "3.22"
- "edge"

- name: Build and push
uses: docker/build-push-action@v6
fail-fast: false
uses: dockette/.github/.github/workflows/docker.yml@master
secrets: inherit
with:
image: "dockette/alpine"
tag: "${{ matrix.version }}"
context: "${{ matrix.version }}"

docs:
name: "Docs"
runs-on: "ubuntu-latest"
needs: ["build"]
if: github.ref == 'refs/heads/master'

steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Update Docker Hub description"
uses: peter-evans/dockerhub-description@v5
with:
context: ./${{ matrix.version }}
push: true
tags: dockette/alpine:${{ matrix.version }}
platforms: linux/amd64,linux/arm64
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: "dockette/alpine"
48 changes: 48 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
IMAGE ?= dockette/alpine
VERSION ?= 3.22
TAG ?= $(VERSION)

MAINTAINED_VERSIONS := 3.22 3.21 edge

.PHONY: build test run $(addprefix build-,$(MAINTAINED_VERSIONS)) $(addprefix test-,$(MAINTAINED_VERSIONS)) $(addprefix run-,$(MAINTAINED_VERSIONS))

build:
docker build -t $(IMAGE):$(TAG) $(VERSION)

test:
docker run --rm $(IMAGE):$(TAG) /bin/sh -c 'set -eu; \
if [ "$(VERSION)" != "edge" ]; then grep -Eq "^$(VERSION)(\\.|$$)" /etc/alpine-release; else test -s /etc/alpine-release; fi; \
test "$$(id -u dfx)" = "1000"; \
test "$${USER_UID}" = "1000"; \
test "$${USER_NAME}" = "dfx"; \
test "$${USER_HOME}" = "/home/dfx"'

run:
docker run --rm -it $(IMAGE):$(TAG)

build-3.22:
$(MAKE) build VERSION=3.22

test-3.22:
$(MAKE) test VERSION=3.22

run-3.22:
$(MAKE) run VERSION=3.22

build-3.21:
$(MAKE) build VERSION=3.21

test-3.21:
$(MAKE) test VERSION=3.21

run-3.21:
$(MAKE) run VERSION=3.21

build-edge:
$(MAKE) build VERSION=edge

test-edge:
$(MAKE) test VERSION=edge

run-edge:
$(MAKE) run VERSION=edge
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Alpine
<h1 align=center>Dockette / Alpine</h1>

Base docker image based on Alpine Linux.
<p align=center>
<a href="https://github.com/dockette/alpine/actions"><img src="https://github.com/dockette/alpine/actions/workflows/docker.yml/badge.svg" alt="GitHub Actions"></a>
<a href="https://hub.docker.com/r/dockette/alpine"><img src="https://img.shields.io/docker/pulls/dockette/alpine.svg" alt="Docker Hub pulls"></a>
<a href="https://github.com/sponsors/f3l1x"><img src="https://img.shields.io/badge/sponsor-GitHub%20Sponsors-ea4aaa" alt="GitHub Sponsors"></a>
<a href="https://github.com/orgs/dockette/discussions"><img src="https://img.shields.io/badge/support-discussions-6f42c1" alt="Support/Discussions"></a>
</p>

-----

[![Docker Stars](https://img.shields.io/docker/stars/dockette/alpine.svg?style=flat)](https://hub.docker.com/r/dockette/alpine/)
[![Docker Pulls](https://img.shields.io/docker/pulls/dockette/alpine.svg?style=flat)](https://hub.docker.com/r/dockette/alpine/)
<p align=center>
Base docker image based on Alpine Linux.
</p>

## Discussion / Help

[![Join the chat](https://img.shields.io/gitter/room/dockette/dockette.svg?style=flat-square)](https://gitter.im/contributte/contributte?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-----

## Image

Expand All @@ -25,7 +27,7 @@ Base docker image based on Alpine Linux.
|--------|-------------------------|------------|
| edge | `dockette/alpine:edge` | [edge](https://hub.docker.com/r/dockette/alpine) |
| v3.22 | `dockette/alpine:v3.22` | [v3.22](https://hub.docker.com/r/dockette/alpine) |
| v3.21 | `dockette/alpine:v3.21` | [v3.20](https://hub.docker.com/r/dockette/alpine) |
| v3.21 | `dockette/alpine:v3.21` | [v3.21](https://hub.docker.com/r/dockette/alpine) |
| v3.20 | `dockette/alpine:v3.20` | [v3.20](https://hub.docker.com/r/dockette/alpine) |
| v3.19 | `dockette/alpine:v3.19` | [v3.19](https://hub.docker.com/r/dockette/alpine) |
| v3.18 | `dockette/alpine:v3.18` | [v3.18](https://hub.docker.com/r/dockette/alpine) |
Expand Down