Comments (1)
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)
- Error creating pipeline 05 azure-devops-kubernetes-terrraform
- deployment.yaml is missing HOT 2
- The presentation.pdf file is not opening HOT 2
- Unable to perform Python code in VS code HOT 2
- Kubectl diff command fails on windows HOT 1
- Jenkins configuration after running blue-ocean docker image
- 05-azure-kubernetes-cluster-iaac-pipeline fails on storage account creation HOT 2
- Issues while running java application image HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devops-master-class.