doqueu

command module
v0.0.0-...-0bed73a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

doqueu - Docker container management API

Generate API docs

go get -u github.com/fdiblen/doqueu
swag init

Run the server

go run main.go

API documentation can be fount at http://localhost:8080/swagger/index.html

Examples

List containers

curl -X 'GET' \
  'http://localhost:8080/api/v1/containers' \
  -H 'accept: application/json'

Run a container

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

curl -X 'POST' \
  'http://localhost:8080/api/v1/containers/stop' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'id=15b16c8bae4eea58f77fbf9558cb487502565e7a4bb4d170c0fc93884e532c7c'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL