initial commit
This commit is contained in:
commit
7bebe28b01
2
.hadolint.yaml
Normal file
2
.hadolint.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
ignored:
|
7
.pre-commit-config.yaml
Normal file
7
.pre-commit-config.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
fail_fast: false
|
||||
repos:
|
||||
- repo: https://git.dotya.ml/wanderer/hadolint-pre-commit
|
||||
rev: v0.0.1
|
||||
hooks:
|
||||
- id: hadolint-container
|
27
Containerfile
Normal file
27
Containerfile
Normal file
@ -0,0 +1,27 @@
|
||||
# syntax=docker/dockerfile:1.3
|
||||
FROM registry.fedoraproject.org/fedora-minimal:36
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
|
||||
LABEL description="Container image based on fedora-minimal, hourly updated, serving as a base image for other projects"
|
||||
|
||||
LABEL org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.vcs-url="https://git.dotya.ml/wanderer/fedora-minimal.git" \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.license=GPL-3.0
|
||||
|
||||
# DL3041 warning: Specify version with `dnf install -y <package>-<version>`.
|
||||
# hadolint ignore=DL3041
|
||||
RUN microdnf --refresh upgrade -y && \
|
||||
microdnf install -y --nodocs --setopt install_weak_deps=0 \
|
||||
findutils \
|
||||
&& microdnf clean all -y; \
|
||||
\
|
||||
rm -rf /usr/share/zoneinfo/*; rm -rf /usr/include/*; \
|
||||
find /. -name "*~" -type f -delete > /dev/null 2>&1; \
|
||||
find /usr/share/terminfo/. -type f -delete \
|
||||
! -name "*xterm*" ! -name "*screen*" ! -name "*screen*"
|
||||
WORKDIR /
|
||||
|
||||
# vim: ft=dockerfile
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Adam Mirre <a_mirre at utb dot cz>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
dcmd = podman
|
||||
dfile = Containerfile
|
||||
dtag = immawanderer/fedora-minimal: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):ro
|
||||
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 = ghcr.io/hadolint/hadolint
|
||||
hadolinttag = v2.10.0-alpine
|
||||
hadolintargs = run --rm -i -v $$PWD:/src:ro --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)
|
8
README.md
Normal file
8
README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# fedora-minimal
|
||||
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
|
||||
|
||||
this repo provides a Containerfile to build a container image based on
|
||||
fedora-minimal, hourly updated, serving as a base image for other projects
|
||||
|
||||
### LICENSE
|
||||
MIT
|
Loading…
Reference in New Issue
Block a user