https://github.com/meierschlumpf/docker-api
A small web app with three docker endpoints to start, stop and restart docker containers by id
https://github.com/meierschlumpf/docker-api
Last synced: 7 months ago
JSON representation
A small web app with three docker endpoints to start, stop and restart docker containers by id
- Host: GitHub
- URL: https://github.com/meierschlumpf/docker-api
- Owner: Meierschlumpf
- License: mit
- Created: 2023-06-13T20:28:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-13T20:38:15.000Z (over 2 years ago)
- Last Synced: 2024-10-06T02:21:47.267Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker API
This application is a simple API that allows you to manage docker containers.
## Getting Started
To get started you need to run the following commands:
```bash
$ git clone https://github.com/Meierschlumpf/docker-api.git
$ cd docker-api
$ yarn install
$ yarn dev
```## API
The API exposes the following endpoints:
### POST /api/containers/[id]/start
Starts a container.
### POST /api/containers/[id]/stop
Stops a container.
### POST /api/containers/[id]/restart
Restarts a container.
## Environment Variables
The following environment variables are required to run the application:
```env
DOCKER_HOST=
DOCKER_PORT=
```You can simply create a `.env` file in the root directory of the project and add the variables there.