Mount a host folder in a container
- Stop the container
- Run the
pct set
command like the example below to create a mapping:pct set <vmid> -mp0 /media/1tb,mp=/media/1tb
What does this command mean?
pct set
- command to change container settings<vmid>
- id of the container (i.e. 103)-mp0
- identifier of the mountpoint. Multiple mountpoints would be subsequently named. (i.e. -mp1, -mp2, -mp3, etc.)/media/1tb
- folder on host,mp=/media/1tb
- destination mount folder inside container
Repository Pinning
Alpine allows you to ‘pin’ repositories so that you can pull packages from different package streams. Add the repositories in /etc/apk/repositories
:
@edge http://nl.alpinelinux.org/alpine/edge/main
@testing http://nl.alpinelinux.org/alpine/edge/testing
Save and update your repositories. You can then install from the pinned repos.
apk update
apk add stableapp newapp@edge bleedingapp@testing
Install a specific version of an app.
Specific app versions can be installed using a simple syntax:
apk add asterisk=1.6.0.21-r0
# or
apk add 'asterisk<1.6.1'
Cron in Alpine (i.e. BusyBox Cron)
The easiest way to get a script to run is to place it in one of several pre-setup directories:
/etc/periodic/15min
/etc/periodic/hourly
/etc/periodic/daily
/etc/periodic/weekly
/etc/periodic/monthly
If these don’t work for you, you can add your script the normal way in /etc/crontabs/root
.
Tips
- Make sure your script is executable by root!
- Your script should NOT end with
.sh
.
Important Directories
Container configuration file
/etc/pve/lxc/<CTID>.conf
Default container OS configuration files
/usr/share/lxc/config/<ostype>.common.conf
Remove Proxmox subscription nag popup
Proxmox 4.3
- Backup the file
/usr/share/pve-manager/ext6/pvemanagerlib.js
- Edit the file
/usr/share/pve-manager/ext6/pvemanagerlib.js
- Find the line that says
if (data.status !== 'Active')
(around line 557) - Change to
if (false)
- Save and quit
You may need to reload your browser and/or clear your cache