Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Reichl <[email protected]>
  • Loading branch information
thetredev committed Oct 1, 2023
0 parents commit b0000f8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build non-root XBPS container image

on:
push:
branches:
- docker

# TODO: create arch matrix
env:
GHCR_IMAGE: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:x86_64"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build container image
run: |
docker build -t ${GHCR_IMAGE} image/x86_64
docker push ${GHCR_IMAGE}
19 changes: 19 additions & 0 deletions image/x86_64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ghcr.io/void-linux/void-buildroot-glibc:20230904R2

RUN xbps-install -Sy \
xbps \
&& xbps-install -Syu \
&& xbps-install -Sy \
git \
cmake \
python3 \
tar \
shadow \
util-linux \
&& groupadd -g 5000 user \
&& useradd -u 5000 -g user -s /bin/bash user \
&& mkdir -m 1777 /__w \
&& chown -R user:user /__w

WORKDIR /home/user
USER user

0 comments on commit b0000f8

Please sign in to comment.