A bash script that will automate the process of importing a Docker container into Proxmox/LXC.
LICENSE | ||
proxmox-docker-import.sh | ||
README.md |
proxmox-docker-import
A bash script that will automate the process of importing a Docker container into Proxmox/LXC.
The script includes:
-
Command line options to customize:
- Docker image (-i)
- Container name (-n)
- Output template name (-t)
-
All the necessary steps:
- Installing required packages
- Creating LXC container from Docker image
- Configuring networking
- Removing extra TTYs
- Setting up network interfaces
- Adding required packages
- Configuring services
- Creating the final template
To use the script:
- Save it to a file (e.g.,
proxmox-docker-import.sh
) - Make it executable:
chmod +x proxmox-docker-import.sh
- Run it as root:
sudo ./proxmox-docker-import.sh
You can also customize the process using options:
sudo ./proxmox-docker-import.sh -i ubuntu:20.04 -n mycontainer -t ubuntu-20.04-docker_$(date +%Y%m%d)_amd64.tar.xz