Skip to content

Commit

Permalink
adding dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
timveil committed Jul 27, 2018
1 parent 0e8ea3b commit cda1bff
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
target
.idea
*.iml
overops-event-generator.log
overops-event-generator.log.*
README.md
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM centos:7

LABEL maintainer="[email protected]"

RUN yum install -y java-1.8.0-openjdk-devel.x86_64 net-tools \
&& yum -y update \
&& yum clean all \
&& mkdir /code

ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk

ENV PATH $JAVA_HOME/bin:$PATH

ADD .mvn /code/.mvn
ADD mvnw /code
ADD mvnw.cmd /code
ADD src /code/src
ADD pom.xml /code

WORKDIR /code

RUN ./mvnw clean package -DskipTests

ENTRYPOINT java -jar target/*.jar
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,25 @@ cf push overops-event-generator -p target/overops-event-generator-1.2.1.jar
# bind the "takipi" service to the generator
cf bind-service overops-event-generator takipi

# restage the generator and enjoy
# re-stage the generator and enjoy
cf restage overops-event-generator

```

## Docker Examples
** coming soon **
I've included a simple `Dockerfile` that can be used to launch the event generator. You can execute the following commands:

### Building the Image
```bash
docker build --no-cache -t timveil/overops-event-generator .
```

### Publishing the Image
```bash
docker push timveil/overops-event-generator:latest
```

### Running the Image
```bash
docker run -it timveil/overops-event-generator
```

0 comments on commit cda1bff

Please sign in to comment.