automatically installing additional packages immediately after container is created

lonesoac0

Member
Dec 18, 2019
17
0
21
40
Hello all,

I am attempting to add additional software immediately after a container is created. I am using the script of: https://github.com/tteck/Proxmox/raw/main/ct/debian.sh. I am specifically focusing on the function of:

Code:
function update_script() {
header_info
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated $APP LXC"
exit
}

My logic is that if the apt update and upgrade can be used, then so can the apt install command. I am running the code from a node shell. What am I missing???
 
I am attempting to add additional software immediately after a container is created.
You should create your own container and/or equip them with some built-in automation like ansible or puppet etc. to do what you want.

Most containers are useless and old if you download them, there I strongly advise in investing time in building your own infrastructure for hosting your own container images that are e.g. automatically updated via some CI software.
 
Hello all,

I am attempting to add additional software immediately after a container is created. I am using the script of: https://github.com/tteck/Proxmox/raw/main/ct/debian.sh. I am specifically focusing on the function of:

Code:
function update_script() {
header_info
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated $APP LXC"
exit
}

My logic is that if the apt update and upgrade can be used, then so can the apt install command. I am running the code from a node shell. What am I missing???
First, you need to understand how the scripts work.
https://github.com/tteck/Proxmox/blob/main/CODE-AUDIT.md