pkgrepo jail

Setup for poudriere package server jail with iocage.

On FreeNAS

Create jail:

iocage create --release 11.1-RELEASE --name pkgrepo \ boot="on" vnet=on \ allow_raw_sockets="1" \ ip4_addr="vnet1|" \ interfaces="vnet1:bridge1" \ defaultrouter="" \ resolver="search;nameserver;nameserver"

Mount packages from host into jail with nullfs.

iocage exec pkgrepo 'mkdir -p /usr/local/poudriere/data/packages' iocage fstab --add pkgrepo '/mnt/tank/data/poudriere/packages /usr/local/poudriere/data/packages nullfs rw 0 0'

Check fstab:

iocage fstab --list pkgrepo

Start jail and enter.

iocage start pkgrepo iocage console pkgrepo


In the jail, update all packages.

pkg update && pkg upgrade

Web Server

pkg install nginx && sysrc nginx_enable=YES

Remove all inside server in /usr/local/etc/nginx/nginx.conf, add:

Check config and start nginx:

service nginx configtest service nginx start

In jail, nullfs mount packages to same spot. Install nginx.

server { listen 80 default; server_name; root /usr/local/poudriere/data/packages; autoindex on; }

results matching ""

    No results matching ""