Coder Social home page Coder Social logo

Comments (1)

Amitabh1989 avatar Amitabh1989 commented on August 20, 2024

To over come this issue, you need to build the JAR file.

To build the JAR file :

mvn clean install

And this worked fine.

Logs Snippet of the completion of build:

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.jar (155 kB at 3.0 MB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar (233 kB at 3.9 MB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar (239 kB at 3.2 MB/s)
[INFO] Installing C:\GitHub\devops-master-class\kubernetes\01-hello-world-rest-api\target\hello-world-rest-api.jar to C:\Users\amita\.m2\repository\com\in28minutes\rest\webservices\01-hello-world-rest-api\0.0.4-SNAPSHOT\01-hello-world-rest-api-0.0.4-SNAPSHOT.jar
[INFO] Installing C:\GitHub\devops-master-class\kubernetes\01-hello-world-rest-api\pom.xml to C:\Users\amita\.m2\repository\com\in28minutes\rest\webservices\01-hello-world-rest-api\0.0.4-SNAPSHOT\01-hello-world-rest-api-0.0.4-SNAPSHOT.pom
[INFO] Installing C:\GitHub\devops-master-class\kubernetes\01-hello-world-rest-api\target\hello-world-rest-api-docker-info.jar to C:\Users\amita\.m2\repository\com\in28minutes\rest\webservices\01-hello-world-rest-api\0.0.4-SNAPSHOT\01-hello-world-rest-api-0.0.4-SNAPSHOT-docker-info.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:59 min
[INFO] Finished at: 2023-05-13T09:01:23+05:30
[INFO] ------------------------------------------------------------------------

And now when I build the docker image, it works fine.

PS C:\GitHub\devops-master-class\kubernetes\01-hello-world-rest-api> docker build -t ainebula/hello-worlds-rest-api:0.0.1.RELEASE . [+] Building 0.1s (7/7) FINISHED => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 163B 0.0s => [internal] load metadata for docker.io/library/openjdk:8-jdk-alpine 0.0s => [internal] load build context 0.0s => => transferring context: 144B 0.0s => [1/2] FROM docker.io/library/openjdk:8-jdk-alpine 0.0s => CACHED [2/2] ADD target/*.jar app.jar 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:a8730bd740ef8bafd18a68c4f6bdb3a8d1835165e81a22ce5382123c7389282f 0.0s => => naming to docker.io/ainebula/hello-worlds-rest-api:0.0.1.RELEASE 0.0s PS C:\GitHub\devops-master-class\kubernetes\01-hello-world-rest-api> docker push hello-world-rest-api:0.0.1.RELEASE The push refers to repository [docker.io/library/hello-world-rest-api] An image does not exist locally with the tag: hello-world-rest-api PS C:\GitHub\devops-master-class\kubernetes\01-hello-world-rest-api> docker build -t ainebula/hello-world-rest-api:0.0.1.RELEASE . [+] Building 0.1s (7/7) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 163B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/openjdk:8-jdk-alpine 0.0s => [internal] load build context 0.0s => => transferring context: 144B 0.0s => [1/2] FROM docker.io/library/openjdk:8-jdk-alpine 0.0s => CACHED [2/2] ADD target/*.jar app.jar 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:990680fb8bc62b74026a05f4272d2c7ac285d41c836441f373c228aeb4506867 0.0s => => naming to docker.io/ainebula/hello-world-rest-api:0.0.1.RELEASE 0.0s PS C:\GitHub\devops-master-class\kubernetes\01-hello-world-rest-api> docker push ainebula/hello-world-rest-api:0.0.1.RELEASE The push refers to repository [docker.io/ainebula/hello-world-rest-api] cecff4b3d98b: Pushed ceaf9e1ebef5: Mounted from ainebula/currency-conversion 9b9b7f3d56a0: Mounted from ainebula/currency-conversion f1b5933fe4b5: Mounted from ainebula/currency-conversion 0.0.1.RELEASE: digest: sha256:f3d231e328098acde8d2a08229dda028565fdd75edc2064db4443fb2c01da95f size: 1159

from devops-master-class.

Related Issues (9)

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.