Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daggerok/docker-maven-plugin-example
Manage Docker daemon with Maven
https://github.com/daggerok/docker-maven-plugin-example
docker docker-maven-plugin fabric8 fabric8-maven-plugin maven maven-plugin
Last synced: 6 days ago
JSON representation
Manage Docker daemon with Maven
- Host: GitHub
- URL: https://github.com/daggerok/docker-maven-plugin-example
- Owner: daggerok
- Created: 2019-03-18T21:50:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-05T08:51:56.000Z (over 3 years ago)
- Last Synced: 2024-11-11T15:40:21.335Z (2 months ago)
- Topics: docker, docker-maven-plugin, fabric8, fabric8-maven-plugin, maven, maven-plugin
- Size: 63.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# manage docker with maven
In this example I'm going to demonstrate how easily amd quick postgres database can be started in docker by using
fabric8 `docker-maven-plugin`Table of Content
- [Install](#install)
- [`docker run -d` with `mvn docker:start`](#start)
- [`docker rm -f -v` with `mvn docker:stop`](#stop)
- [Help with `mvn docker:help`](#help)
- [Reference for reading](#read-more)## install
assuming you have in your `pom.xml` file:
```xml
healthcheck/postgres:alpine
postgres
5432:5432
postgres
postgres
postgres
10000
PostgreSQL init process complete
io.fabric8
docker-maven-plugin
0.28.0
true
true
500
default
true
always
properties
postgres.docker
```## start
_start postgres container with `docker run -d -p 5432:5432 ... healthcheck/postgres:apline` command_
```bash
mvn docker:start
```## stop
_stop and remove container, like with `docker rm -f -v postgres-1` command_
```bash
mvn docker:start
```## help
```bash
mvn docker:help
```## cleanup if you missed to remove your other images
```bash
for i in $(docker images -q -f dangling=true); do docker rmi -f $i ; done
```## read more
- [External Configuration](https://dmp.fabric8.io/#external-configuration)
- [docker:stop reference](https://dmp.fabric8.io/#docker:stop)