{"id":19656773,"url":"https://github.com/daggerok/docker-maven-plugin-example","last_synced_at":"2026-05-15T00:06:02.085Z","repository":{"id":151041527,"uuid":"176375112","full_name":"daggerok/docker-maven-plugin-example","owner":"daggerok","description":"Manage Docker daemon with Maven","archived":false,"fork":false,"pushed_at":"2021-06-05T08:51:56.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T00:45:37.963Z","etag":null,"topics":["docker","docker-maven-plugin","fabric8","fabric8-maven-plugin","maven","maven-plugin"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daggerok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2019-03-18T21:50:06.000Z","updated_at":"2021-06-05T08:51:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5180869-9034-427c-91fe-d1c0666d3898","html_url":"https://github.com/daggerok/docker-maven-plugin-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fdocker-maven-plugin-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fdocker-maven-plugin-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fdocker-maven-plugin-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fdocker-maven-plugin-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/docker-maven-plugin-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240964932,"owners_count":19885832,"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-maven-plugin","fabric8","fabric8-maven-plugin","maven","maven-plugin"],"created_at":"2024-11-11T15:28:51.680Z","updated_at":"2026-05-15T00:06:01.983Z","avatar_url":"https://github.com/daggerok.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# manage docker with maven\nIn this example I'm going to demonstrate how easily amd quick postgres database can be started in docker by using\nfabric8 `docker-maven-plugin`\n\nTable of Content\n\n- [Install](#install)\n- [`docker run -d` with `mvn docker:start`](#start)\n- [`docker rm -f -v` with `mvn docker:stop`](#stop)\n- [Help with `mvn docker:help`](#help)\n- [Reference for reading](#read-more)\n\n## install\n\nassuming you have in your `pom.xml` file:\n\n```xml\n  \u003cproperties\u003e\n    \u003cpostgres.docker.name\u003ehealthcheck/postgres:alpine\u003c/postgres.docker.name\u003e\n    \u003cpostgres.docker.log.prefix\u003epostgres\u003c/postgres.docker.log.prefix\u003e\n    \u003cpostgres.docker.ports.1\u003e5432:5432\u003c/postgres.docker.ports.1\u003e\n    \u003c!--\u003cpostgres.docker.ports.1\u003e${itest.postgres.port}:5432\u003c/postgres.docker.ports.1\u003e--\u003e\n    \u003cpostgres.docker.env.POSTGRES_DB\u003epostgres\u003c/postgres.docker.env.POSTGRES_DB\u003e\n    \u003cpostgres.docker.envRun.POSTGRES_USER\u003epostgres\u003c/postgres.docker.envRun.POSTGRES_USER\u003e\n    \u003cpostgres.docker.envRun.POSTGRES_PASSWORD\u003epostgres\u003c/postgres.docker.envRun.POSTGRES_PASSWORD\u003e\n    \u003cpostgres.docker.wait.time\u003e10000\u003c/postgres.docker.wait.time\u003e\n    \u003cpostgres.docker.wait.log\u003ePostgreSQL init process complete\u003c/postgres.docker.wait.log\u003e\n  \u003c/properties\u003e\n\n  \u003cbuild\u003e\n    \u003cplugins\u003e\n      \u003cplugin\u003e\n        \u003cgroupId\u003eio.fabric8\u003c/groupId\u003e\n        \u003cartifactId\u003edocker-maven-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e0.28.0\u003c/version\u003e\n        \u003cconfiguration\u003e\n          \u003callContainers\u003etrue\u003c/allContainers\u003e\n          \u003cremoveVolumes\u003etrue\u003c/removeVolumes\u003e\n          \u003cwatchInterval\u003e500\u003c/watchInterval\u003e\n          \u003clogDate\u003edefault\u003c/logDate\u003e\n          \u003cverbose\u003etrue\u003c/verbose\u003e\n          \u003cautoPull\u003ealways\u003c/autoPull\u003e\n          \u003cimages\u003e\n            \u003cimage\u003e\n              \u003cexternal\u003e\n                \u003ctype\u003eproperties\u003c/type\u003e\n                \u003cprefix\u003epostgres.docker\u003c/prefix\u003e\n              \u003c/external\u003e\n            \u003c/image\u003e\n          \u003c/images\u003e\n        \u003c/configuration\u003e\n      \u003c/plugin\u003e\n    \u003c/plugins\u003e\n  \u003c/build\u003e\n```\n\n## start\n\n_start postgres container with `docker run -d -p 5432:5432 ... healthcheck/postgres:apline` command_\n\n```bash\nmvn docker:start\n```\n\n## stop\n\n_stop and remove container, like with `docker rm -f -v postgres-1` command_\n\n```bash\nmvn docker:start\n```\n\n## help\n```bash\nmvn docker:help\n```\n\n## cleanup if you missed to remove your other images\n\n```bash\nfor i in $(docker images -q -f dangling=true); do docker rmi -f $i ; done\n```\n\n## read more\n\n- [External Configuration](https://dmp.fabric8.io/#external-configuration)\n- [docker:stop reference](https://dmp.fabric8.io/#docker:stop)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fdocker-maven-plugin-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fdocker-maven-plugin-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fdocker-maven-plugin-example/lists"}