Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugojosefson/proxmox-create-docker-ct
Run each docker-compose.yml inside one unprivileged LXC container, on Proxmox (PVE).
https://github.com/hugojosefson/proxmox-create-docker-ct
container ct docker docker-compose lxc proxmox pve
Last synced: 10 days ago
JSON representation
Run each docker-compose.yml inside one unprivileged LXC container, on Proxmox (PVE).
- Host: GitHub
- URL: https://github.com/hugojosefson/proxmox-create-docker-ct
- Owner: hugojosefson
- License: mit
- Created: 2022-05-28T14:47:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-27T22:44:34.000Z (9 months ago)
- Last Synced: 2024-09-17T01:21:28.997Z (about 2 months ago)
- Topics: container, ct, docker, docker-compose, lxc, proxmox, pve
- Language: TypeScript
- Homepage:
- Size: 110 KB
- Stars: 19
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# create-docker-ct for Proxmox VE
Scripts and notes for running one `docker-compose.yml` application using
[Docker Compose](https://github.com/docker/compose) inside an unprivileged LXC
container, on
[Proxmox Virtual Environment (PVE)](https://www.proxmox.com/en/proxmox-ve).Use this if you want:
- one unprivileged LXC container per one application (one `docker-compose.yml`)
- a bind-mounted directory into each container/application, where
- its `docker-compose.yml` lives there
- its configuration lives there
- its data lives thereThis means, that to deploy a new application, you...
1. run the script `create-docker-ct` with the name of your new application as
argument,
2. create or download its `docker-compose.yml` file into the directory the
script tells you,
3. start the newly created LXC container.## Install
### Prerequisites
- Install PVE (for example via
https://github.com/hugojosefson/proxmox-root-on-encrypted-zfs).### Install create-docker-ct
```sh
curl -sSfL https://github.com/hugojosefson/proxmox-create-docker-ct/tarball/main \
| tar -xzvC /usr/local/bin --wildcards "*/usr_local_bin/" --strip-components=2
```## Create an app CT
```
USAGE:create-docker-ct --help This help message
create-docker-ct Create a CT from alpine-3.18-default_20230607_amd64.tar.xz
create-docker-ct [] Create a CT from specified base templateEXAMPLE:
create-docker-ct my-service
create-docker-ct my-service alpine-3.18-default_20230607_amd64.tar.xz
create-docker-ct my-service ubuntu-22.04-standard_22.04-1_amd64.tar.zst
create-docker-ct my-service debian-12-standard_12.0-1_amd64.tar.zst
```Run this script:
```sh
create-docker-ct
```...where `` is the name of the app.
The application's name will be its directory name, and its hostname.
The script will output:
- the app CT's VMID number, and
- the directory mounted as `/appdata` inside the CT, where its
`docker-compose.yml` etc. lives.## Deploy/redeploy application inside
Edit the CT's `docker-compose.yml` file, or overwrite it with what you want to
deploy.Start or restart the app CT:
```sh
pct start
``````sh
pct restart
```