### Start Application (Node.js) Source: https://github.com/rakibtg/docker-web-gui/blob/master/README.md Executes the main application file 'app.js' using Node.js. This command will also automatically install any missing Node.js modules required by the application. ```bash node app.js ``` -------------------------------- ### Install Dependencies with npm Source: https://github.com/rakibtg/docker-web-gui/blob/master/client/README.md Installs all necessary project dependencies listed in package.json. This is a crucial first step before running other development or build commands. ```bash npm install ``` -------------------------------- ### Get a list of images Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Fetches a list of all Docker images available on the system. ```APIDOC ## GET /api/image/fetch ### Description Retrieves a list of all Docker images currently stored on the system. ### Method GET ### Endpoint /api/image/fetch ### Response #### Success Response (200) - Returns an array of image objects, each containing details like ID, creation time, size, and repository name. ### Response Example ```json [ { "ID": "8f60bf1d0f34", "CreatedSince": "2 weeks ago", "Size": "470MB", "VirtualSize": "470MB", "Repository": "gsk_kubernets" }, { "ID": "cea865d1a9a0", "CreatedSince": "2 weeks ago", "Size": "470MB", "VirtualSize": "470MB", "Repository": "docker_web" } ] ``` ``` -------------------------------- ### Start Development Server with npm Source: https://github.com/rakibtg/docker-web-gui/blob/master/client/README.md Runs the React application in development mode. It opens the app at http://localhost:3000 and enables hot reloading for edits. Lint errors are displayed in the console. ```bash npm start ``` -------------------------------- ### Build and Run with Docker Compose (Docker Compose) Source: https://github.com/rakibtg/docker-web-gui/blob/master/README.md Builds the Docker images defined in docker-compose.yml and starts the services. This is a convenient way to run the application using Docker Compose. ```docker-compose docker-compose build docker-compose up ``` -------------------------------- ### Run generic command to a specific container Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Executes a command (start, stop, restart) on a specified container. ```APIDOC ## GET /api/container/command ### Description Executes a specified command on a given Docker container. This is useful for managing the lifecycle of containers. ### Method GET ### Endpoint /api/container/command #### Query Parameters - **container** (string) - Required - The ID of the container on which to execute the command (e.g., `3da3ad7b90e3`). - **command** (string) - Required - The command to execute. Accepted values include `start`, `stop`, `restart`, etc. ### Response #### Success Response (200) - Typically returns the container ID upon successful execution. The exact response may vary based on the command executed. ### Response Example ``` "3da3ad7b90e3" ``` ``` -------------------------------- ### Makefile Commands (Bash) Source: https://github.com/rakibtg/docker-web-gui/blob/master/README.md Provides a set of make commands for building, starting, stopping, and restarting the Docker Dashboard application, as well as specific commands for building and running without Docker Compose. ```makefile make up make build make start make stop make restart make build-without-compose make run-without-compose ``` -------------------------------- ### Clone Repository (Git) Source: https://github.com/rakibtg/docker-web-gui/blob/master/README.md Clones the Docker Dashboard repository from GitHub. This is the initial step to get the project code on your local machine. ```bash git clone git@github.com:rakibtg/docker-web-gui.git ``` -------------------------------- ### Get a list of container groups Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Fetches a list of all defined container groups. ```APIDOC ## GET /api/groups ### Description Retrieves a list of container groups. Each group represents a collection of related containers, often organized for a specific project or purpose. ### Method GET ### Endpoint /api/groups ### Response #### Success Response (200) - Returns a list of group objects, each containing an ID, name, associated container IDs, and timestamps for creation and update. ### Response Example ```json { "id": 13, "name": "Alien Ship Project", "containers_id": "[\"1bb3b55b3202\",\"171be371c488\",\"280f85e27167\"]", "created_at": "2019-09-18 18:01:09", "updated_at": "2019-09-18 18:01:09" } ``` ``` -------------------------------- ### Get a list of containers Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Fetches a list of containers, optionally filtering by status. ```APIDOC ## GET /api/container/fetch ### Description Retrieves a list of containers from the Docker environment. You can filter the list by specifying the container status. ### Method GET ### Endpoint /api/container/fetch #### Query Parameters - **status** (string) - Optional - Filters containers by status. Possible values: `all`, `active`, `stopped`. Defaults to `active`. ### Response #### Success Response (200) - Returns an array of container objects, each containing details like ID, creation time, state, and name. ### Response Example ```json [ { "Id": "19ea7e796993c1b3486ffa4207994ef7e9cf7844072c6760970375b89e96d45c", "shortId": "19ea7e796993", "Created": "2019-08-27T15:44:09.8723696Z", "State": { "Status": "exited", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 100, "Error": "", "StartedAt": "2019-08-27T15:44:10.5869722Z", "FinishedAt": "2019-08-27T15:44:29.0294127Z" }, "Name": "/goofy_antonelli" } ] ``` ``` -------------------------------- ### Get a List of Images - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Fetches a list of all Docker images available in the environment. Returns a JSON array of image objects, including their ID, creation time, size, and repository name. ```HTTP GET /api/image/fetch ``` -------------------------------- ### Get text log of a container Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Retrieves the text-based logs for a specified container. ```APIDOC ## GET /api/container/logs ### Description Fetches the log output from a specific container. The logs are returned as a string that may include special characters like newlines and tabs. ### Method GET ### Endpoint /api/container/logs #### Query Parameters - **container** (string) - Required - The ID of the container whose logs are to be retrieved (e.g., `3da3ad7b90e3`). ### Response #### Success Response (200) - Returns a string containing the log entries for the container. ### Response Example ``` "172.18.0.1 - - \n[27/Aug/2019:16:13:01 +0000] \"POST /api/v1/actions/upload/ HTTP/1.1\" 200 1357 \"-\" \"insomnia/6.6.2\"\n172.18.0.1 - - \n[27/Aug/2019:16:28:36 +0000] \"POST /api/v1/actions/upload/ HTTP/1.1\" 200 1522 \"-\" \"insomnia/6.6.2\"\n172.18.0.1 - - \n[27/Aug/2019:16:31:38 +0000] \"POST /api/v1/actions/upload/ HTTP/1.1\" 200 1357 \"-\" \"insomnia/\n...\n...\n``` ``` -------------------------------- ### Get a container by ID Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Fetches details for a specific container using its ID. ```APIDOC ## GET /api/container/fetchById ### Description Retrieves detailed information about a specific container using its unique identifier. ### Method GET ### Endpoint /api/container/fetchById #### Query Parameters - **container** (string) - Required - The ID of the container to fetch (e.g., `3da3ad7b90e3`). ### Response #### Success Response (200) - Returns a JSON object containing comprehensive information about the specified container. ### Response Example ```json { "Id": "3da3ad7b90e321fbf0fd2466d2555a7092c0642e7ad07fbe5d623fa0c6f65ada", "shortId": "3da3ad7b90e3", "Created": "2019-08-27T16:11:57.4812983Z", "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 2660, "ExitCode": 0, "Error": "", "StartedAt": "2019-08-31T04:25:12.807509894Z", "FinishedAt": "2019-08-31T04:25:07.825047009Z" }, "Name": "/dinky-dank-docker_web_1" } ``` ``` -------------------------------- ### Run Generic Command on Container - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Executes a generic command (e.g., start, stop, restart) on a specified container. Requires the container ID and the command to be executed as query parameters. Typically returns the container ID upon success. ```HTTP GET /api/container/command?container=container-id&command=start ``` -------------------------------- ### Get a List of Containers - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Fetches a list of containers from the Docker environment. Supports filtering by status (all, active, stopped) with a default of 'active'. Returns a JSON array of container objects. ```HTTP GET /api/container/fetch?status=active ``` -------------------------------- ### Navigate to Project Directory (Bash) Source: https://github.com/rakibtg/docker-web-gui/blob/master/README.md Changes the current directory to the root of the cloned Docker Dashboard project. This is necessary before running any build or start commands. ```bash cd ./docker-web-gui ``` -------------------------------- ### Get system consumption stats of all active containers Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Retrieves the system resource consumption statistics (CPU, memory, network) for all currently active containers. ```APIDOC ## GET /api/container/stats ### Description Fetches the current system resource usage statistics for all running containers. ### Method GET ### Endpoint /api/container/stats ### Response #### Success Response (200) - Returns a list of objects, where each object details the resource consumption (CPU percentage, memory usage, network I/O) for an active container. ### Response Example ```json [ { "id": "3da3ad7b90e3", "cpu_percentage": "0.01%", "memory_usage": "9.77MiB / 1.952GiB", "network_io": "998B / 0B" } ] ``` ``` -------------------------------- ### Eject Project Configuration with npm Source: https://github.com/rakibtg/docker-web-gui/blob/master/client/README.md Exposes all the underlying configuration and build tools (like Webpack, Babel) used by the create-react-app setup. This is an irreversible operation and is typically only needed for advanced customization. ```bash npm run eject ``` -------------------------------- ### Get System Consumption Stats - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Retrieves the system consumption statistics for all currently active containers. Returns a JSON array where each object represents a container's CPU, memory, and network usage. ```HTTP GET /api/container/stats ``` -------------------------------- ### Get a Container by ID - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Retrieves detailed information about a specific container using its ID. The `container` query parameter should be the container's ID. Returns a JSON object containing container details. ```HTTP GET /api/container/fetchById?container=container-id ``` -------------------------------- ### Get a List of Container Groups - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Retrieves a list of container groups. Each group is an object containing an ID, name, a list of container IDs, and timestamps for creation and updates. The `containers_id` field is a string representation of a JSON array. ```HTTP GET /api/groups ``` -------------------------------- ### Get Container Logs - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Fetches the text logs for a specific container. The `container` query parameter specifies the target container ID. The response is a string that may contain special characters like newlines and tabs. ```HTTP GET /api/container/logs?container=container-id ``` -------------------------------- ### Build Production Version with npm Source: https://github.com/rakibtg/docker-web-gui/blob/master/client/README.md Creates a production-ready build of the React application in the 'build' folder. It optimizes the build for performance by minifying code and adding hashes to filenames. ```bash npm run build ``` -------------------------------- ### Build Docker Image (Docker) Source: https://github.com/rakibtg/docker-web-gui/blob/master/README.md Builds the Docker image for the docker-web-gui application using the provided Dockerfile. The image is tagged as 'docker-web-gui'. ```docker docker build . -t docker-web-gui ``` -------------------------------- ### Run Docker Container (Docker) Source: https://github.com/rakibtg/docker-web-gui/blob/master/README.md Runs the docker-web-gui Docker image as a container. It maps port 3230 from the host to the container, mounts the Docker binary and socket for container interaction. ```docker docker run -p 3230:3230 -v /usr/local/bin/docker:/usr/local/bin/docker -v /var/run/docker.sock:/var/run/docker.sock docker-web-gui ``` -------------------------------- ### Run Generic Command on Image - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Executes a generic command (e.g., run, rmi) on a specified Docker image. Requires the image ID and the command as query parameters. The response typically returns the image ID. ```HTTP GET /api/image/command?image=image-id&command=run ``` -------------------------------- ### Run generic command to a specific image Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Executes a command (e.g., run, rmi) on a specified Docker image. ```APIDOC ## GET /api/image/command ### Description Executes a specified command on a given Docker image. This can be used for operations like running a container from an image or removing an image. ### Method GET ### Endpoint /api/image/command #### Query Parameters - **image** (string) - Required - The ID of the image on which to execute the command (e.g., `3da3ad7b90e3`). - **command** (string) - Required - The command to execute. Accepted values include `run`, `rmi`, etc. ### Response #### Success Response (200) - Typically returns the image ID upon successful execution. The exact response may vary based on the command executed. ### Response Example ``` "3da3ad7b90e3" ``` ``` -------------------------------- ### Create a Container Group - API Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Creates a new container group. This is a POST request to the `/api/groups` endpoint. It requires `name` for the group and a list of `containers` (by ID) to be included in the group. ```HTTP POST /api/groups?name=my group name&containers=['4232ewdw', 'sdsdw24343'] ``` -------------------------------- ### Create a container group Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/README.md Creates a new container group with a specified name and associated containers. ```APIDOC ## POST /api/groups ### Description Creates a new group for organizing containers. You can assign a name to the group and specify which containers belong to it. ### Method POST ### Endpoint /api/groups #### Query Parameters - **name** (string) - Required - The desired name for the new container group (e.g., `'my group name'`). - **containers** (array of strings) - Required - An array of container IDs to include in the new group (e.g., `['4232ewdw', 'sdsdw24343']`). ### Response #### Success Response (200) - Typically returns a success message or the newly created group's details. ``` -------------------------------- ### Docker Management Interface Initialization (JavaScript) Source: https://github.com/rakibtg/docker-web-gui/blob/master/backend/web/index.html This snippet contains the core JavaScript code responsible for initializing and running the Docker Management Interface application. It appears to be a webpack-generated bundle, handling module loading and application execution. No external dependencies are explicitly mentioned within this snippet, but it relies on the browser's JavaScript environment. ```javascript !function(f){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],l=0,i=[];l