Skip to content

Commit

Permalink
added docker configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DharshiBalasubramaniyam committed Jun 28, 2024
1 parent 2d64de9 commit d8c7665
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ jobs:

- name: Build with Maven
run: mvn clean install

- name: Login to DockerHub
run: docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}

- name: Build Docker image
run: docker build -t dharshib/springboot-ci-cd

- name: Push the image to DockerHub
run: docker push dharshib/springboot-ci-cd:latest
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM openjdk:11-jre-slim
EXPOSE 8080
ADD target/springboot-ci-cd.jar springboot-ci-cd.jar
ENTRYPOINT ["java","-jar","/springboot-ci-cd.jar"]
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
</configuration>
</plugin>
</plugins>
<finalName>springboot-ci-cd</finalName>
</build>

</project>

0 comments on commit d8c7665

Please sign in to comment.