Skip to content

thegeekplanets/springboot-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring-boot + Docker

This Application will create a docker image for a spring boot application. then we'll deploy and manage the docker images on docker hub.

🧐 Features

Here are some of the project's best features:

  • Build Docker Image
  • Push docker image to docker hub
  • Deploy the docker image locally
  • swagger UI to test the REST api endpoints

🛠️ Installation Steps:

1. Build Project

mvn clean install -Dmaven.test.skip=true

2. Create a dockerfile

FROM openjdk:17-jdk-alpine EXPOSE 8080 ADD target/springboot-docker-0.0.1-SNAPSHOT.jar springboot-docker.jar ENTRYPOINT ["java""-jar""/springboot-docker.jar"]

3. Build docker image

docker build -t springboot-docker:latest .

4. Docker run

docker run -d -p 8080:8080 springboot-docker

5. Docker container stop

docker stop 

6. Docker login

docker login -u <DOCKER_USERNAME> -p <DOCKER_PASSWORD> docker.io

7. Docker image tag

docker tag springboot-docker:latest <DOCKER_USERNAME>/springboot-docker

8. Docker push

docker push <DOCKER_USERNAME>/springboot-docker

9. Docker pull image

docker pull <DOCKER_USERNAME>/springboot-docker

10. Docker run

docker run -d -p 8080:8080 <DOCKER_USERNAME>/springboot-docker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published