Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shubham1172/pocket
Container in Python
https://github.com/shubham1172/pocket
Last synced: about 1 month ago
JSON representation
Container in Python
- Host: GitHub
- URL: https://github.com/shubham1172/pocket
- Owner: shubham1172
- License: gpl-3.0
- Created: 2019-09-05T17:55:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-14T13:32:29.000Z (about 2 years ago)
- Last Synced: 2024-10-20T23:45:42.500Z (2 months ago)
- Language: Python
- Size: 55.7 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Container in Python :smile_cat:## Requirements
- Linux operating system (tested on Debian and Arch)
- Python3.6+## Using pocket
- Clone the repository
```bash
$ git clone https://github.com/shubham1172/pocket
```- Install the requirements
```bash
$ python3 -m pip install -r requirements.txt
```- Create your first configuration file
```bash
$ touch pocket.yaml
$ cat <> pocket.yaml
name: my-container
image: ubuntu:14.04
copy:
- src: /etc/resolv.conf # for enabling DNS
dest: etc/resolv.conf
run:
- /bin/bash
limit:
mem: 100
cpu: 10
EOF
```- Start your first container
```bash
$ python3 -m pocket.cli.main create pocket.yaml
```- List all containers
```bash
$ python3 -m pocket.cli.main ls
```- Run a command in a container
```bash
$ python3 -m pocket.cli.main run
```- Delete a container
```bash
$ python3 -m pocket.cli.main rm
```- Delete all containers
```bash
$ python3 -m pocket.cli.main rm -a
```