GithubHelp home page GithubHelp logo

upasana05ghosh / docker-kubernetes-jar-file Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 3.0 58 KB

Create Docker image of a java jar file and manage the container using Kubernetes | Docker | Kubernetes | Jar | Pods

License: MIT License

Java 100.00%
docker-image kubernetes docker-kubernetes-jar java-jar

docker-kubernetes-jar-file's Introduction

Docker-Kubernetes-jar-file

Create Docker image of a java jar file and manage the container image using Kubernetes

  • Docker is a open source tool.
  • It is designed to makes it easier to create, deploy and run applications by using containers.
  • Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package, called image.
  • It ensures that the application will run the same no matter which server or laptop its running on.
  • This way, it eliminates the “it works on my machine” problem.
  • Developers will not spend time in setting up environments or debugging environment-specific issues.
  • Ensures consistent environments from development to production.
  • It is an open source container orchestration tool.
  • It is used to automate deployments, scaling, and operations of application containers across clusters of hosts
  • Kubernetes is capable of doing auto-placement, auto-restart, auto-replication and auto-healing of containers extremely well.

Create docker image of a runnable jar file:

  1. Clone the repository
git clone 
  1. Open command prompt or powershell and build the dockerfile
docker build -t java_helloworld .

(Note: Don't forget to put dot (.) at the end of the command)

  1. Check docker-images
docker images

  1. Run the docker image
docker run java_helloworld


Push docker image to docker hub

  1. Log in to Docker Hub. Enter your password when prompted
docker login --username=yourusername [email protected]
  1. Tag your image
docker tag java_helloworld yourusername/java_helloworld:latest
  1. Push your image to docker hub repository
docker push yourusername/java_helloworld

Manage image container using Kubernetes

Create container by running yaml file

kubectl apply -f java_helloworld.yaml

docker-kubernetes-jar-file's People

Contributors

upasana05ghosh avatar

Watchers

 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.