Skip to content

Commit 1d4efc9

Browse files
committed
Add Dockerfile for initial ramdisk environment
1 parent 3cfa5fd commit 1d4efc9

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Initrd Base Image
2+
3+
on:
4+
push:
5+
paths:
6+
- 'lib/system/alpine-initrd/Dockerfile'
7+
- '.github/workflows/build-initrd-image.yml'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-and-push:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Get short SHA
17+
id: sha
18+
run: echo "short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Login to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ secrets.DOCKERHUB_USERNAME }}
27+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
28+
29+
- name: Build and push
30+
uses: docker/build-push-action@v5
31+
with:
32+
context: ./lib/system/alpine-initrd
33+
platforms: linux/amd64,linux/arm64
34+
push: true
35+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/hypeman-initrd:${{ steps.sha.outputs.short }}
36+
cache-from: type=gha
37+
cache-to: type=gha,mode=max
38+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Alpine-based initrd base image for Hypeman
2+
# Includes socat for vsock-based remote exec functionality
3+
FROM alpine:3.22
4+
5+
# Install socat for vsock support
6+
RUN apk add --no-cache socat
7+
8+
# Minimal metadata
9+
LABEL org.opencontainers.image.description="Alpine base image with socat for Hypeman initrd"
10+
LABEL org.opencontainers.image.source="https://github.com/onkernel/hypeman"
11+

0 commit comments

Comments
 (0)