Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdiblen/doqueu
Docker manager written in GO
https://github.com/fdiblen/doqueu
Last synced: about 1 month ago
JSON representation
Docker manager written in GO
- Host: GitHub
- URL: https://github.com/fdiblen/doqueu
- Owner: fdiblen
- License: apache-2.0
- Created: 2022-04-20T07:54:53.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-20T07:57:47.000Z (almost 3 years ago)
- Last Synced: 2024-06-19T17:58:57.960Z (7 months ago)
- Language: Go
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# doqueu - Docker container management API
## Generate API docs
```console
go get -u github.com/fdiblen/doqueu
swag init
```## Run the server
```console
go run main.go
```API documentation can be fount at [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html)
## Examples
List containers
```console
curl -X 'GET' \
'http://localhost:8080/api/v1/containers' \
-H 'accept: application/json'
```Run a container
```console
curl -X 'POST' \
'http://localhost:8080/api/v1/containers/run' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'imagename=ubuntu:latest' \
-F 'command=echo "Hello World"'
```Stop a running container
```console
curl -X 'POST' \
'http://localhost:8080/api/v1/containers/stop' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'id=15b16c8bae4eea58f77fbf9558cb487502565e7a4bb4d170c0fc93884e532c7c'
```