Compare commits

..

No commits in common. "master" and "v0.3.2" have entirely different histories.

6 changed files with 58 additions and 131 deletions

@ -1,70 +1,44 @@
---
kind: pipeline
name: dockerhub-build-trigger
platform:
arch: amd64
trigger:
branch: master
exclude:
event: pull_request
steps:
- name: call webhook
pull: always
image: curlimages/curl:latest
environment:
ENDPOINT:
from_secret: dockerhub_endpoint
commands:
- curl -s -X POST $ENDPOINT
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: testing name: kaniko-build
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
depends_on:
- dockerhub-build-trigger
steps: steps:
- name: hadolint - name: build
pull: always pull: always
image: docker.io/hadolint/hadolint:v2.12.0-alpine image: ghcr.io/finitum/drone-kaniko:0.8.1
commands:
- hadolint --version
- hadolint Dockerfile
when:
ref:
- refs/heads/master
- "refs/heads/feature-**"
- "refs/pull/**"
- "refs/tags/**"
event:
exclude: [cron]
- name: kaniko-build
pull: always
image: docker.io/immawanderer/drone-kaniko:linux-amd64
settings: settings:
dockerfile: Dockerfile dockerfile: Dockerfile
context: . context: .
args:
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
when:
ref:
- "refs/heads/feature-**"
- "refs/pull/**"
- "refs/tags/**"
event:
exclude: [cron]
- name: kaniko-publish
pull: always
image: docker.io/immawanderer/drone-kaniko:linux-amd64
settings:
dockerfile: Dockerfile
context: .
args:
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
tags:
- latest
- linux-amd64
- ${DRONE_COMMIT_SHA:0:8}
repo: immawanderer/archlinux
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
ref:
- refs/heads/master
event:
exclude: [pull_request, tag]
trigger:
event: [push, pull_request, cron, tag]
--- ---
kind: pipeline kind: pipeline
@ -89,12 +63,12 @@ trigger:
- cron - cron
depends_on: depends_on:
- testing - kaniko-build
steps: steps:
- name: discord - name: discord
pull: if-not-exists pull: if-not-exists
image: docker.io/appleboy/drone-discord:latest image: appleboy/drone-discord:latest
settings: settings:
message: "{{#success build.status}} ✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{else}} ❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{/success}}\n" message: "{{#success build.status}} ✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{else}} ❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{/success}}\n"
webhook_id: webhook_id:
@ -119,27 +93,21 @@ trigger:
event: event:
- cron - cron
cron: cron:
- nightly-build - hourly-build
status: status:
- success - success
- failure - failure
depends_on: depends_on:
- testing - kaniko-build
steps: steps:
- name: discord - name: discord
pull: always pull: always
image: docker.io/appleboy/drone-discord:latest image: appleboy/drone-discord:latest
settings: settings:
message: "{{#success build.status}} ✅ [Scheduled build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{else}} ❌ [Scheduled build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{/success}}\n" message: "{{#success build.status}} ✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{else}} ❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{/success}}\n"
webhook_id: webhook_id:
from_secret: discord_webhook_hourly_id from_secret: discord_webhook_hourly_id
webhook_token: webhook_token:
from_secret: discord_webhook_hourly_token from_secret: discord_webhook_hourly_token
---
kind: signature
hmac: bc36fd53d1d57053f660e05df07722e8cb2e82edc732ec8898d7308ad891b905
...

@ -1,2 +0,0 @@
---
ignored:

@ -1,35 +1,26 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.2
# refs: # refs:
# https://docs.docker.com/develop/develop-images/build_enhancements/#overriding-default-frontends # https://docs.docker.com/develop/develop-images/build_enhancements/#overriding-default-frontends
# https://pythonspeed.com/articles/docker-buildkit/ # https://pythonspeed.com/articles/docker-buildkit/
FROM docker.io/library/archlinux:base-devel FROM archlinux:latest
ARG BUILD_DATE ARG BUILD_DATE
ARG VCS_REF ARG VCS_REF
# as per https://github.com/opencontainers/image-spec/blob/main/annotations.md, LABEL description="Hourly updated archlinux base image"
# keep Label Schema labels for backward compatibility.
LABEL description="hourly updated archlinux base(-devel) image" \ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://git.dotya.ml/wanderer/docker-archlinux.git" \ org.label-schema.vcs-url="https://git.dotya.ml/wanderer/docker-archlinux.git" \
org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.license=GPL-3.0 \ org.label-schema.license=GPL-3.0
org.opencontainers.image.title="docker-archlinux" \
org.opencontainers.image.description="hourly updated archlinux base(-devel) image" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.authors=wanderer \
org.opencontainers.image.url="https://git.dotya.ml/wanderer/docker-archlinux.git" \
org.opencontainers.image.source="https://git.dotya.ml/wanderer/docker-archlinux.git" \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.licenses=GPL-3.0
# if you need the WORKAROUND for glibc 2.33 and old Docker # if you need the WORKAROUND for glibc 2.33 and old Docker
# have a look at https://git.dotya.ml/wanderer/docker-archlinux/commit/bd4c5abe4dca475965548cb8332ef9b9d2a4953c # have a look at https://git.dotya.ml/wanderer/docker-archlinux/commit/bd4c5abe4dca475965548cb8332ef9b9d2a4953c
RUN pacman --version && \ RUN pacman --version
\
\ RUN pacman -Syu --noconfirm --needed
pacman -Syu --noconfirm --needed && \ RUN pacman --noconfirm -Rn $(pacman -Qdtq) || true
pacman --noconfirm -Rn "$(pacman -Qdtq)" || true && \ RUN pacman -Scc && rm -rf /var/cache/pacman/* /var/lib/pacman/sync/* \
pacman -Scc && rm -rf /var/cache/pacman/* /var/lib/pacman/sync/* rm -rv /tmp/* || true

@ -2,7 +2,7 @@ GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
Copyright © 2020-2021 Adam Mirre <a_mirre@utb.cz> Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed. document, but changing it is not allowed.

@ -1,34 +0,0 @@
dcmd = docker
dfile = Dockerfile
dtag = immawanderer/archlinux:testbuild
dargs = build -t $(dtag) --no-cache --pull - < $(dfile)
cleanargs = image rm -f $(dtag)
pruneargs = system prune -af
dargskaniko = run --rm -it -w=$(kanikowdir) -v $$PWD:$(kanikowdir):z
kanikoexecutorimg = gcr.io/kaniko-project/executor:v1.8.1-debug
kanikowdir = /src
kanikocontext = .
kanikoargs = -f=$(dfile) -c=$(kanikocontext) --use-new-run --snapshotMode=redo --build-arg BUILD_DATE=$(build_date) --build-arg VCS_REF=$(vcs_ref) --no-push
vcs_ref = $$(git rev-parse --short HEAD)
build_date= $$(date -u +"%Y-%m-%dT%H:%M:%SZ")
hadolintimg = docker.io/hadolint/hadolint
hadolinttag = v2.12.0-alpine
hadolintargs = run --rm -i -v $$PWD:/src:z --workdir=/src
.PHONY: hadolint build kaniko clean test prune
hadolint:
$(dcmd) $(hadolintargs) $(hadolintimg):$(hadolinttag) < $(dfile)
kaniko:
$(dcmd) $(dargskaniko) $(kanikoexecutorimg) $(kanikoargs)
build:
$(dcmd) $(dargs)
clean:
$(dcmd) $(cleanargs)
test: hadolint build kaniko
prune:
$(dcmd) $(pruneargs)

@ -1,14 +1,18 @@
# docker-archlinux # docker-archlinux
[![Build Status](https://drone.dotya.ml/api/badges/wanderer/docker-archlinux/status.svg)](https://drone.dotya.ml/wanderer/docker-archlinux) [![Build Status](https://drone.dotya.ml/api/badges/wanderer/docker-archlinux/status.svg)](https://drone.dotya.ml/wanderer/docker-archlinux)
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/immawanderer/archlinux)](https://hub.docker.com/r/immawanderer/archlinux/tags/?page=1&ordering=last_updated) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/immawanderer/archlinux)](https://hub.docker.com/r/immawanderer/archlinux/builds)
[![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/immawanderer/archlinux/linux-amd64)](https://hub.docker.com/r/immawanderer/archlinux/tags/?page=1&ordering=last_updated&name=linux-amd64) [![](https://images.microbadger.com/badges/version/immawanderer/archlinux.svg)](https://microbadger.com/images/immawanderer/archlinux)
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/immawanderer/archlinux/linux-amd64)](https://hub.docker.com/r/immawanderer/archlinux/tags/?page=1&ordering=last_updated&name=linux-amd64) [![](https://images.microbadger.com/badges/commit/immawanderer/archlinux.svg)](https://microbadger.com/images/immawanderer/archlinux)
[![Docker pulls](https://img.shields.io/docker/pulls/immawanderer/archlinux)](https://hub.docker.com/r/immawanderer/archlinux/)
This repository provides a Dockerfile to create an *updated* Arch Linux base(-devel) image. This repository provides the Dockerfile to create an updated Arch Linux base image.
The image is rebuilt nightly to ensure it always has the latest packages. ## :warning: :construction: DockerHub issue :construction: :warning:
unless you're running Arch as your host OS, please make sure you read through the following issue write-up \
⇒ https://git.dotya.ml/wanderer/docker-archlinux/issues/1 \
:warning: :construction: :construction: :construction: :warning:
The image is rebuilt approximately every hour to ensure it always has the latest packages.
push mirror lives in [this GitHub repo](https://github.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-archlinux) push mirror lives in [this GitHub repo](https://github.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-archlinux)
development happens on [this Gitea instance](https://git.dotya.ml/wanderer/docker-archlinux) development happens on [this Gitea instance](https://git.dotya.ml/wanderer/docker-archlinux)
@ -22,7 +26,7 @@ That's just it. This makes it possible to just grab the image and install whatev
* Arch Linux image with freshly updated package base to build upon * Arch Linux image with freshly updated package base to build upon
## Running the image ## Running the image
* edit the `yourlocalpath` and `containerpath` variables or remove them entirely (along with `-v`) if you have *nothing to mount* * edit the `yourlocalpath` and `containerpath` variabled or remove them entirely (along with `-v`) if you have *nothing to mount*
```bash ```bash
docker run -it -v yourlocalpath:containerpath immawanderer/archlinux:latest docker run -it -v yourlocalpath:containerpath immawanderer/archlinux:latest