The project is based on yarn package manager. It would work with npm, but it's not guaranteed that correct versions will be installed. For more info please check https://www.npmjs.com/package/semver
-
Prerequisites
The user should be in
docker
group. For more https://docs.docker.com/install/linux/linux-postinstall/
yarn install
yarn tsc
docker build -t "manage_docker_containers" .
docker run --env APP_PORT=3001 -p 3001:3001 -it manage_docker_containers
yarn test
Import in postman to get access on the API's endpoints https://www.getpostman.com/collections/4e19e3d2eccf6e36a742
GET /api/containers
Query param | Type | Description | Default |
---|---|---|---|
all | boolean | view all containers | false |
by default it returns the running containers
POST /api/containers
body
{
name: "ngingx",
tag: "myNginxContainer"
}
PATCH /api/containers/{id}
body
{
status: "start"
}
PATCH /api/containers/{id}
body
{
status: "stop"
}
DELETE /api/containers/{id}
GET /api/containers/{id}/resources
GET /api/containers/{id}/logs