initial commit

This commit is contained in:
surtur 2020-06-02 16:28:02 +02:00
commit 5080c3e17b
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
3 changed files with 59 additions and 0 deletions

17
Dockerfile Normal file

@ -0,0 +1,17 @@
FROM archlinux:latest
ARG BUILD_DATE
ARG VCS_REF
LABEL description="Hourly updated archlinux base image"
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-archlinux.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.license=GPL-3.0
WORKDIR /tmp/
RUN pacman -Syu --noconfirm --needed && pacman --noconfirm -R $(pacman -Qdtq) || true
RUN pacman -Scc && rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/* \
rm -rv /tmp/* || true
WORKDIR /

32
README.md Normal file

@ -0,0 +1,32 @@
# docker-archlinux
This repository provides the Dockerfile to create an updated Arch Linux base image.
The image is rebuilt approximately every hour to ensure it always has the latest packages.
## What you get
* updated Arch Linux [base image](https://hub.docker.com/_/archlinux)
That's just it. This makes it possible to just grab the image and install whatever it is you want on top later.
## Purpose
* Arch Linux image with freshly updated package base to build upon
## Running the image
* edit the `yourlocalpath` and `containerpath` variabled or remove them entirely (along with `-v`) if you have *nothing to mount*
```bash
docker run -it -v yourlocalpath:containerpath immawanderer/archlinux:latest
```
## Building the image locally
* create a new folder
* grab the Dockerfile and place it in that folder
* build the image locally
```bash
mkdir -pv mynewfolder
cd ./mynewfolder
wget https://raw.githubusercontent.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-archlinux/master/Dockerfile
docker build --pull - < Dockerfile
```

10
hooks/build Normal file

@ -0,0 +1,10 @@
#!/bin/bash
# as per https://github.com/rossf7/label-schema-automated-build
# $IMAGE_NAME var is injected into the build so the tag is correct.
echo "Build hook running"
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
-t $IMAGE_NAME .