fix: fixed some typos and refined it a bit
This commit is contained in:
parent
a95afc8680
commit
e7ddf9e9e6
8 changed files with 20 additions and 26 deletions
|
@ -6,6 +6,12 @@ You might want to change the hostname in docker-compose.yml to something you lik
|
|||
You can change the './socat/data/socat.sh' and ips/ports you want to passtthrough. AND DONT FORGET TO DO THAT
|
||||
TOO IN THE DOCKER-COMPOSE.YML!!
|
||||
|
||||
## Network setup
|
||||
You can set up the network with this:
|
||||
```bash
|
||||
sudo docker network create --ipam-driver default --subnet 192.168.12.0/24 netvm
|
||||
```
|
||||
|
||||
## Building the images
|
||||
We first need to build the images to do this:
|
||||
```bash
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{}
|
|
@ -4,10 +4,10 @@ networks:
|
|||
name: netvm
|
||||
|
||||
services:
|
||||
pve-server2:
|
||||
image: pve-custom2
|
||||
pve-server:
|
||||
image: pve-custom
|
||||
build: ./pve
|
||||
container_name: pve-server2
|
||||
container_name: pve-server
|
||||
privileged: true
|
||||
hostname: pve-owo
|
||||
networks:
|
||||
|
|
|
@ -14,7 +14,7 @@ RUN apt-get update && \
|
|||
|
||||
RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apt update && apt install -y isc-dhcp-server kitty-terminfo btop logrotate neovim netcat-openbsd sudo openssh-server wget systemctl curl gnupg ca-certificates rsyslog net-tools iputils-ping && \
|
||||
apt-get update && apt-get install -y isc-dhcp-server kitty-terminfo btop logrotate neovim netcat-openbsd openssh-server wget systemctl curl gnupg ca-certificates rsyslog net-tools iputils-ping && \
|
||||
echo "**** setup openssh environment ****" && \
|
||||
useradd -m rander && \
|
||||
usermod --shell /bin/bash rander && \
|
||||
|
@ -82,7 +82,7 @@ RUN echo "root:root"|chpasswd
|
|||
|
||||
RUN systemctl enable pvenetcommit.service pve-firewall isc-dhcp-server
|
||||
|
||||
RUN mkdir -p /var/lib/dhcp && apt update && apt install ifupdown2 -y || true
|
||||
RUN mkdir -p /var/lib/dhcp && apt-get update && apt-get install ifupdown2 -y || true
|
||||
|
||||
# add local files
|
||||
EXPOSE 2222
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
ADMIN_PASSWORD="nyaowo"
|
||||
USER_PASSWORD="nyaowo"
|
||||
|
||||
# logging functions
|
||||
pve_log() {
|
||||
|
@ -21,8 +22,8 @@ pve_error() {
|
|||
|
||||
# Verify that the minimally required password settings are set for new databases.
|
||||
docker_verify_minimum_env() {
|
||||
if [ -z "$ADMIN_PASSWORD" ]; then
|
||||
pve_error $'Password option is not specified\n\tYou need to specify an ADMIN_PASSWORD'
|
||||
if [ -z "$ADMIN_PASSWORD" ] && [ "$USER_PASSWORD" ]; then
|
||||
pve_error $'Password option is not specified\n\tYou need to specify an ADMIN/USER_PASSWORD'
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -33,21 +34,21 @@ systemctl start networking && systemctl start isc-dhcp-server &
|
|||
|
||||
|
||||
docker_setup_pve() {
|
||||
#Set pve user
|
||||
#Set root user
|
||||
echo "root:$ADMIN_PASSWORD"|chpasswd
|
||||
#Set user
|
||||
echo "pve:$USER_PASSWORD"|chpasswd
|
||||
}
|
||||
|
||||
systemctl start networking && systemctl start isc-dhcp-server &
|
||||
RELAY_HOST=${RELAY_HOST:-ext.home.local}
|
||||
sed -i "s/RELAY_HOST/$RELAY_HOST/" /etc/postfix/main.cf
|
||||
PVE_ENTERPRISE=${PVE_ENTERPRISE:-no}
|
||||
rm -f /etc/apt/sources.list.d/pve-enterprise.list
|
||||
|
||||
# functions
|
||||
docker_verify_minimum_env
|
||||
|
||||
echo 'rander:12345' | chpasswd
|
||||
|
||||
docker_setup_pve
|
||||
sleep 10 && networking_misc &
|
||||
|
||||
if [ ! -d /var/log/pveproxy ]; then
|
||||
mkdir -p /var/log/pveproxy
|
||||
|
@ -58,13 +59,10 @@ if [ -n "$ENABLE_PVE_FIREWALL" -a "$ENABLE_PVE_FIREWALL" == "no" ]; then
|
|||
systemctl mask pve-firewall.service
|
||||
fi
|
||||
|
||||
sleep 10 && networking_misc &
|
||||
echo "Running PVE..."
|
||||
exec "$@"
|
||||
|
||||
while true; do
|
||||
# Your commands or checks here
|
||||
sleep 60 # Adjust the sleep interval as needed
|
||||
sleep 1m # Adjust the sleep interval as needed
|
||||
done
|
||||
|
||||
#exec gosu backup /usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy "$@"
|
||||
|
|
|
@ -16,7 +16,6 @@ RUN apt-get update && \
|
|||
RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apt update && apt install -y socat logrotate btop kitty-terminfo neovim netcat-openbsd sudo wget systemctl curl gnupg ca-certificates rsyslog net-tools iputils-ping && \
|
||||
echo "**** setup openssh environment ****" && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
$HOME/.cache
|
||||
|
@ -24,16 +23,10 @@ RUN \
|
|||
#set (temporary) password for root
|
||||
RUN echo "root:root"|chpasswd
|
||||
|
||||
# add local files
|
||||
EXPOSE 2222
|
||||
EXPOSE 8006
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
#use setup.sh to start proxmox service
|
||||
STOPSIGNAL SIGINT
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
VOLUME /config
|
||||
#CMD [ "/lib/systemd/systemd", "log-level=info", "unit=sysinit.target"]
|
||||
|
|
|
@ -5,10 +5,8 @@ ADMIN_PASSWORD="nyaowo"
|
|||
|
||||
# Verify that the minimally required password settings are set for new databases.
|
||||
echo "root:$ADMIN_PASSWORD"|chpasswd
|
||||
mkdir -p /var/lib/dhcp
|
||||
/bin/bash /root/socat.sh &
|
||||
|
||||
|
||||
echo "Running SOCAT..."
|
||||
exec "$@"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue