Skip to content

Commit

Permalink
build: dockerfile adicionado ao projeto; configuracao de criacao de i…
Browse files Browse the repository at this point in the history
…magem atraves do maven
  • Loading branch information
almeidawilliam committed May 7, 2021
1 parent 28d0483 commit 488f351
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM adoptopenjdk/openjdk11:alpine
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ services:
depends_on:
- prometheus

proposta:
build:
dockerfile: Dockerfile
context: .
image: proposta
restart: on-failure
container_name: proposta
ports:
- "8080:8080"

vault:
image: vault:1.5.3
ports:
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layers>
<enabled>true</enabled>
</layers>
</configuration>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 488f351

Please sign in to comment.