https://github.com/nick-robo/container_manager_script
Simple container manager
https://github.com/nick-robo/container_manager_script
bash containers docker docker-compose
Last synced: 3 months ago
JSON representation
Simple container manager
- Host: GitHub
- URL: https://github.com/nick-robo/container_manager_script
- Owner: nick-robo
- Created: 2022-03-14T09:52:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-14T18:17:14.000Z (over 4 years ago)
- Last Synced: 2025-07-25T11:44:18.146Z (11 months ago)
- Topics: bash, containers, docker, docker-compose
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Container Manager Script
A bash script I wrote to simplify managing my containers. Works with the following directory structure.
```bash
$ tree -L 2 /path/to/my_containers/
.
├── containers
├── first
│ ├── config
│ └── docker-compose.yml
├── second
│ ├── config
│ └── docker-compose.yml.off
├── third
│ ├── data
│ └── docker-compose.yml
└── fourth
└── docker-compose.yaml
```
## Get the Script
Run the following in your container folder.
```bash
$ wget "https://raw.githubusercontent.com/nick-robo/container_manager_script/master/containers"
```
Make it executable.
```bash
chmod +x containers
```
## Usage
Run `./containers help` for help.
```
Usage: ./containers [command] CONTAINER_FOLDER
or: ./containers [command] (acts on all containers which are on)
Available Commands:
help Print this command
list List all container folders by their state (on/off)
update Update and run container
stop Stop a running container
start Start a stopped container
restart Restart a running container
on Change state to on
off Change state to off (will not be affected by other commands)
```
List containers by state.
```bash
$ ./containers list
ON
first
third
fourth
OFF
second
```
Start a container: `./containers start first`
Start all containers which are not off: `./containers start`
Off state prevents commands from working on the container.