|
1 | | -# base-image |
| 1 | +# Base |
2 | 2 |
|
3 | | -The core base image for all native FreeBSD OCI containers in the Daemonless project. |
| 3 | +FreeBSD base image with s6 supervision. |
4 | 4 |
|
5 | | -## Overview |
| 5 | +| | | |
| 6 | +|---|---| |
| 7 | +| **Registry** | `ghcr.io/daemonless/base` | |
| 8 | +| **Source** | [https://github.com/freebsd/freebsd-src](https://github.com/freebsd/freebsd-src) | |
| 9 | +| **Website** | [https://www.freebsd.org/](https://www.freebsd.org/) | |
6 | 10 |
|
7 | | -This image provides a minimal FreeBSD environment optimized for containers. It includes a custom initialization system based on **s6** to manage process lifecycle and environment configuration. |
| 11 | +## Deployment |
8 | 12 |
|
9 | | -## Features |
| 13 | +### Podman Compose |
10 | 14 |
|
11 | | -- **s6 Supervision**: Standardized process management and reaping. |
12 | | -- **PUID/PGID Support**: Map the internal `bsd` user to your host user IDs for seamless volume permissions. |
13 | | -- **VNET Ready**: Configured to work with Virtual Network stacks. |
14 | | -- **Multiple OS Support**: Variants available for FreeBSD 14 and 15. |
15 | | -- **Package Selection**: Supports both `latest` and `quarterly` FreeBSD package branches. |
| 15 | +```yaml |
| 16 | +services: |
| 17 | + base: |
| 18 | + image: ghcr.io/daemonless/base:latest |
| 19 | + container_name: base |
| 20 | + environment: |
| 21 | + volumes: |
| 22 | + ports: |
| 23 | + restart: unless-stopped |
| 24 | +``` |
16 | 25 |
|
17 | | -## Environment Variables |
| 26 | +### Podman CLI |
18 | 27 |
|
19 | | -| Variable | Default | Description | |
20 | | -|----------|---------|-------------| |
21 | | -| `PUID` | 1000 | User ID for the `bsd` user. | |
22 | | -| `PGID` | 1000 | Group ID for the `bsd` user. | |
23 | | -| `TZ` | UTC | Container timezone. | |
| 28 | +```bash |
| 29 | +podman run -d --name base \ |
| 30 | + ghcr.io/daemonless/base:latest |
| 31 | +``` |
24 | 32 |
|
25 | | -## Usage (for Image Developers) |
| 33 | +### Ansible |
26 | 34 |
|
27 | | -Use this as the base for your own FreeBSD images: |
| 35 | +```yaml |
| 36 | +- name: Deploy base |
| 37 | + containers.podman.podman_container: |
| 38 | + name: base |
| 39 | + image: ghcr.io/daemonless/base:latest |
| 40 | + state: started |
| 41 | + restart_policy: always |
| 42 | +``` |
28 | 43 |
|
29 | | -```dockerfile |
30 | | -FROM ghcr.io/daemonless/base-image:15 |
| 44 | +## Configuration |
31 | 45 |
|
32 | | -# Install your app |
33 | | -RUN pkg install -y myapp |
| 46 | +### Environment Variables |
34 | 47 |
|
35 | | -# Add your init scripts |
36 | | -COPY root/ / |
| 48 | +| Variable | Default | Description | |
| 49 | +|----------|---------|-------------| |
37 | 50 |
|
38 | | -# Enable your service |
39 | | -RUN ln -sf /etc/services.d/myapp/run /run/s6/services/myapp/run |
40 | | -``` |
| 51 | +### Volumes |
| 52 | +
|
| 53 | +| Path | Description | |
| 54 | +|------|-------------| |
41 | 55 |
|
42 | | -## Directory Structure |
| 56 | +### Ports |
43 | 57 |
|
44 | | -- `/init`: The main entrypoint script. |
45 | | -- `/etc/cont-init.d/`: Place initialization scripts here (executed once at startup). |
46 | | -- `/etc/services.d/`: Place service definitions here (supervised by s6). |
47 | | -- `/custom-cont-init.d/`: Mount a volume here to run your own startup scripts without rebuilding the image. |
| 58 | +| Port | Protocol | Description | |
| 59 | +|------|----------|-------------| |
48 | 60 |
|
49 | | -## Variants |
| 61 | +## Notes |
50 | 62 |
|
51 | | -- `ghcr.io/daemonless/base-image:15` (FreeBSD 15.x) |
52 | | -- `ghcr.io/daemonless/base-image:14` (FreeBSD 14.x) |
53 | | -- Suffix `-quarterly` for images using the stable quarterly package branch. |
54 | | -<!-- Trigger build --> |
| 63 | +- **User:** `root` (UID/GID set via PUID/PGID) |
| 64 | +- **Base:** Built on `ghcr.io/daemonless/base` (FreeBSD) |
0 commit comments