{"id":20814517,"url":"https://github.com/basilysf1709/dockermake","last_synced_at":"2025-05-07T11:47:47.465Z","repository":{"id":223061013,"uuid":"753759656","full_name":"basilysf1709/dockermake","owner":"basilysf1709","description":"Add a Makefile for your docker","archived":false,"fork":false,"pushed_at":"2024-02-24T07:58:16.000Z","size":30,"stargazers_count":28,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T09:41:22.351Z","etag":null,"topics":["docker","docker-compose","makefile"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/dockermake","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basilysf1709.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-06T18:34:48.000Z","updated_at":"2024-10-30T22:05:38.000Z","dependencies_parsed_at":"2024-02-21T07:47:34.178Z","dependency_job_id":null,"html_url":"https://github.com/basilysf1709/dockermake","commit_stats":null,"previous_names":["basilysf1709/dockermake"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilysf1709%2Fdockermake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilysf1709%2Fdockermake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilysf1709%2Fdockermake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilysf1709%2Fdockermake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basilysf1709","download_url":"https://codeload.github.com/basilysf1709/dockermake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252873940,"owners_count":21817708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","makefile"],"created_at":"2024-11-17T21:17:03.142Z","updated_at":"2025-05-07T11:47:47.446Z","avatar_url":"https://github.com/basilysf1709.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# dockermake v1.0.2\n\n#### Install using `npm i dockermake`\n#### Check it out [here](https://www.npmjs.com/package/dockermake).\n\n#### Live Demo\n\nhttps://github.com/basilysf1709/dockermake/assets/92009321/fb7ce740-0915-4217-bcd3-2d806f42e8fc\n\n## Getting Started\n\nThis README provides guidelines on how to use the Makefile genereated using dockermake managing Docker containers and images. These instructions will cover usage information and for the docker container\n\n### Prerequisites\n\nIn order to run this container you'll need docker installed.\n\n-   Windows\n-   OS X\n-   Linux\n\n### Usage\n\n#### Container Parameters:\n\nList the different parameters available to your container\n\n### Makefile Commands for docker: \n\n#### Run `dockermake` in you root repository:\n\n#### `make build`\n\n-   **Purpose**: Builds a Docker image.\n-   **Details**: This command runs `docker build` with the specified image name, Dockerfile, and build context.\n-   **Usage**: `make build`\n\n#### `make run`\n\n-   **Purpose**: Runs the Docker container in detached mode.\n-   **Details**: Uses the built Docker image to start a new container. It sets the container name and applies any specified port mappings, environment variables, and volume mappings.\n-   **Usage**: `make run`\n\n#### `make stop`\n\n-   **Purpose**: Stops the running Docker container.\n-   **Details**: This command sends a stop signal to the running container identified by the container name.\n-   **Usage**: `make stop`\n\n#### `make remove`\n\n-   **Purpose**: Removes the stopped Docker container.\n-   **Details**: First, it stops the container (if running) using `make stop` and then removes it. Useful for cleaning up containers no longer in use.\n-   **Usage**: `make remove`\n\n#### `make clean-image`\n\n-   **Purpose**: Removes the Docker image.\n-   **Details**: Deletes the Docker image specified by `IMAGE_NAME`.\n-   **Usage**: `make clean-image`\n\n#### `make clean`\n\n-   **Purpose**: Cleans up both the container and the image.\n-   **Details**: It combines `make remove` and `make clean-image` to completely remove the container and the image associated with this project.\n-   **Usage**: `make clean`\n\n#### `make restart`\n\n-   **Purpose**: Restarts the Docker container.\n-   **Details**: This command stops the running container and then starts it again.\n-   **Usage**: `make restart`\n\n#### `make logs`\n\n-   **Purpose**: Displays the logs for the running container.\n-   **Details**: Fetches and displays the output logs from the container, useful for debugging and monitoring.\n-   **Usage**: `make logs`\n\n#### `make shell`\n\n-   **Purpose**: Accesses the shell of the running container.\n-   **Details**: Opens an interactive shell inside the running container, which is useful for debugging within the container environment.\n-   **Usage**: `make shell`\n\n#### `make save`\n\n-   **Purpose**: Saves the Docker image to a tar file.\n-   **Details**: Exports the Docker image to a `.tar` file, which can be useful for backup or transferring the image.\n-   **Usage**: `make save`\n\n#### `make load`\n\n-   **Purpose**: Loads the Docker image from a tar file.\n-   **Details**: Imports a Docker image from a `.tar` file, useful for restoring an image or transferring it from another system.\n-   **Usage**: `make load`\n\n#### Command Line Variables\n\n-   `IMAGE_NAME` - The name of the Docker image.\n-   `CONTAINER_NAME` - The name of the Docker container.\n-   `PORTS` - Port mappings for the Docker container.\n-   `ENV_VARS` - Environment variables for the Docker container.\n-   `VOLUMES` - Volume mappings for persistent data.\n-   `DOCKERFILE` - Path to the Dockerfile.\n-   `CONTEXT` - The build context for Docker.\n\n#### Volumes\n\n-   `/your/local/path:/container/path` - Describe any volumes mounted inside your container.\n\n### Makefile Commands for docker-compose: \nThis Makefile provides a convenient way to manage Docker Compose operations for your project. Below are the available commands and their descriptions:\n\n#### `make build`\n**Purpose**: Builds Docker images using Docker Compose.\n**Details:** This command executes docker-compose build, incorporating any specified build arguments, Docker Compose file, and environment file.\n**Usage:** `make build`\n\n#### `make up`\n- **Purpose**: Starts up the Docker environment.\n- **Details:** Uses docker-compose up -d to create and start containers in detached mode.\n- **Usage:** `make up`\n#### `make down`\n- **Purpose**: Stops and removes Docker containers, networks, images, and volumes.\n- **Details:** Executes docker-compose down, cleaning up the entire Docker environment created by up.\n- **Usage:** `make down`\n#### `make stop`\n- **Purpose**: Stops running Docker containers.\n- **Details:** This command issues a docker-compose stop to halt running containers without removing them.\n- **Usage:** `make stop`\n#### `make remove`\n- **Purpose**: Removes stopped Docker containers.\n- **Details:** Executes docker-compose rm to remove containers that have been stopped.\n- **Usage:** `make remove`\n#### `make clean`\n- **Purpose**: Cleans up everything, including containers, networks, images, and volumes.\n- **Details:** Combines the functionality of down with additional flags to remove images and volumes.\n- **Usage:** make clean\n#### `make logs`\n- **Purpose**: Displays logs for running services.\n- **Details:** Fetches and displays output logs from running containers using docker-compose logs.\n- **Usage:** `make logs`\n#### `make shell`\n- **Purpose**: Accesses the shell of a running container.\n- **Details:** Opens an interactive shell inside a running container.\n#### `make restart`\n- **Purpose**: Restarts Docker containers.\n- **Details:** Stops and then starts the containers, essentially refreshing the Docker environment.\n- **Usage:** `make restart`\n\n#### Command Line Variables\n- `COMPOSE_FILE`: Specifies the Docker Compose file.\n- `ENV_FILE`: Specifies the environment file for Docker Compose.\n- `BUILD_ARGS`: Build arguments to be passed during image building.\n\n### Built With\n\n1. JavaScript\n2. Inquirer\n3. Chalk\n\n### Github stars\n\n\u003ca href=\"https://star-history.com/#basilysf1709/dockermake\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=basilysf1709/dockermake\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=basilysf1709/dockermake\u0026type=Date\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=basilysf1709/dockermake\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n\n\n[![GitHub Repo stars](https://img.shields.io/github/stars/basilysf1709/dockermake)](https://github.com/basilysf1709/dockermake)\n\n### Find Me here\n\n[GitHub](https://github.com/basilysf1709)\n\n### Authors\n\n-   **Basil Yusuf**\n\n### License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasilysf1709%2Fdockermake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasilysf1709%2Fdockermake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasilysf1709%2Fdockermake/lists"}