Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lopezjurip/java-maven-docker
Simple dockerized Maven project
https://github.com/lopezjurip/java-maven-docker
Last synced: 25 days ago
JSON representation
Simple dockerized Maven project
- Host: GitHub
- URL: https://github.com/lopezjurip/java-maven-docker
- Owner: lopezjurip
- Created: 2015-11-02T18:21:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-02T19:47:12.000Z (about 9 years ago)
- Last Synced: 2024-03-15T14:33:10.942Z (8 months ago)
- Language: Java
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Maven Docker
[![Build Status](https://travis-ci.org/mrpatiwi/java-maven-docker.svg)](https://travis-ci.org/mrpatiwi/java-maven-docker)Simple dockerized Maven project with Java 8.
## Created with
```sh
mvn -B archetype:generate \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.mycompany.myapp \
-DartifactId=myapp
```## Getting Started
### Install dependencies
```sh
mvn install
```### Run
```sh
mvn exec:java
```## Docker
### Build
```sh
docker build --no-cache --rm --tag=myapp .
```### Run
```sh
docker run --publish 4567:4567 --rm --name=myapp myapp mvn exec:java
```## Using Docker-Compose
Inside `docker-compose.yml`:
```yml
myapp:
build: .
command: mvn exec:java
ports:
- "4567:4567"
```Run it with:
```sh
docker-compose up -d
```