Skip to content

marvincudjoe/container-manager

Repository files navigation

Container Manager

RESTful web application with a collection of API endpoints for managing Docker containers.

Pre-requisites

Running the application

This project uses Gradle as the build tool. To run the application, execute one of the following commands:

On Linux:

./gradlew bootRun

On Windows:

gradlew.bat bootRun
Alternative: Docker

The docker container may not interact with the Docker Daemon as expected.

docker compose up

To clean up

docker compose down

System Health Check

Health Check to the Docker Engine:

Through the application

curl -I --head \
  'http://localhost:8080/daemon/_ping' \
  -H 'accept: */*'

Direct call

The Docker Engine API is accessible by an HTTP client such as curl.

curl -v --unix-socket /var/run/docker.sock "http://localhost/v1.43/_ping"

If either call fails

  • Verify the Docker Daemon (or this application) is running
  • Verify your docker installation made docker.sock accessible

Swagger

Available Actuator Endpoints

Notes:

Docker provides an API for interacting with the Docker Daemon, called the Docker Engine API.

This project uses an unofficial SDK, docker-java, to interact with the Docker Engine API.

Limitations

This project depends on an unofficial sdk, docker-java, which looks to be actively supported but not actively maintained

Some may see this application as a way to create on demand containers. This is not the intended purpose. This application must not be used as it is. Better solutions exist. See Testcontainers and ContainerSSH.

This is a work in progress to implement what I learn. I may add updates as I progress in studying Kotlin and other development practices.

About

Manage Docker Containers via API calls

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published