A bash script that will automate the process of importing a Docker container into Proxmox/LXC.
Find a file
2024-12-06 11:48:57 +05:30
LICENSE Initial commit 2024-12-06 11:47:25 +05:30
proxmox-docker-import.sh Add proxmox-docker-import.sh 2024-12-06 11:48:12 +05:30
README.md Update README.md 2024-12-06 11:48:57 +05:30

proxmox-docker-import

A bash script that will automate the process of importing a Docker container into Proxmox/LXC.

The script includes:

  1. Command line options to customize:

    • Docker image (-i)
    • Container name (-n)
    • Output template name (-t)
  2. 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:

  1. Save it to a file (e.g., proxmox-docker-import.sh)
  2. Make it executable: chmod +x proxmox-docker-import.sh
  3. 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