GithubHelp home page GithubHelp logo

pravsingh / springboot-dockerized Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 4.0 28 KB

Swagger enabled sample SpringBoot Microservice using Docker plugin to create image, push and pull from DockerHub

Home Page: http://www.designingmicroservices.com

License: GNU General Public License v3.0

Shell 2.53% Java 97.47%
docker docker-plugin dockerhub springboot spring-boot spring java swagger

springboot-dockerized's Introduction

Introduction

A Sample Application based on Spring Boot which uses Docker plugin to build the image of the application. This document lists out the steps to build, push the image and use it to launch the server inside the container.

create account on DockerHub

create account at https://hub.docker.com

initialize local docker to connect to your account

docker login

ensure code builds locally

mvn clean install

create image based on the Dockerfile

mvn install -DskipTests dockerfile:build

verify the image

docker images

push the image to DockerHub

mvn install -DskipTests dockerfile:push

verify if image is published

image pushed at https://hub.docker.com/r/pravsingh/springboot-dockerized/

remove local image

docker rmi pravsingh/springboot-dockerized

pull from DockerHub

docker pull pravsingh/springboot-dockerized

run the app

docker run -p 8080:8080 -t pravsingh/springboot-dockerized

run the app with specific profile

docker run -e "SPRING_PROFILES_ACTIVE=dev" -p 8080:8080 -t pravsingh/springboot-dockerized

run the app using spring-boot-maven-plugin

mvn spring-boot:run

runt the app using jar

./start.sh

access the application API

http://localhost:8080/health

Swagger

http://localhost:8080/swagger-ui.html

springboot-dockerized's People

Contributors

pravsingh avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.