Base images built from Alpine
1.2K
A lightweight, rootless-compatible base image built on Alpine Linux with tini process manager. Designed for building containerized applications that work seamlessly with both Docker and Podman in rootless mode.
/config for persistent dataThis is a base image meant to be used as a foundation for other images.
FROM ghcr.io/boxharbor/baseimage-alpine:latest
# Install your application
RUN apk add --no-cache your-package
# Add your service script
COPY rootfs/ /
# Expose ports
EXPOSE 8080
| Variable | Default | Description |
|---|---|---|
PUID | 1000 | User ID for file permissions |
PGID | 1000 | Group ID for file permissions |
TZ | UTC | Timezone |
UMASK | 022 | File creation mask |
/app - Application files
/config - Persistent configuration (mount this!)
/defaults - Default configuration templates
Create scripts in /etc/cont-init.d/ that run during container startup:
#!/bin/bash
# /etc/cont-init.d/20-my-init
echo "Running custom initialization..."
# Your setup logic here
Scripts are executed in alphanumeric order (10-, 20-, 30-, etc.).
Create service directories in /etc/services.d/:
#!/bin/bash
# /etc/services.d/myapp/run
cd /app
exec /app/myapp-binary
Services run as background processes managed by the init system.
docker run -d \
--name myapp \
-v ./config:/config \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
your-app:latest
podman run -d \
--name myapp \
-v ./config:/config:Z \
-e PUID=1000 \
-e PGID=1000 \
your-app:latest
Note: Use :Z suffix for SELinux systems (Fedora, RHEL, CentOS).
git clone https://github.com/BoxHarbor/baseimage-alpine.git
cd baseimage-alpine
docker build -t boxharbor/baseimage-alpine:latest .
Contributions are welcome! Please read our Contributing Guidelinesâ before submitting PRs.
GPL-3.0 License - see LICENSEâ file for details.
Built with âĪïļ by the BoxHarbor team
Content type
Image
Digest
sha256:483f5c405âĶ
Size
8.5 MB
Last updated
10 months ago
docker pull gaetanddr/baseimage-alpine