---
title: "Senthilkumar (@senthil131720) | Hashnode"
description: "Senthilkumar (@senthil131720) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@senthil131720"
---

@senthil131720

# Senthilkumar

@senthil131720 · Joined April 2021

## Comments

[Hi Ashish, All setup are done now when i try to execute docker run command using docker run -it --rm -p 8080:8080 senthil131720/demo getting below error. I have installed Docker in my machine. Please advice. Thanks again! D:\\Senthil\\Java\\spring-jib\\spring-jib>docker run -it --rm -p 8080:8080 senthil131720/demo Error: -jar requires jar file specification Usage: java \[options\] <mainclass> \[args...\] (to execute a class) or java \[options\] -jar <jarfile> \[args...\] (to execute a jar file) or java \[options\] -m <module>\[/<mainclass>\] \[args...\] java \[options\] --module <module>\[/<mainclass>\] \[args...\] (to execute the main class in a module) or java \[options\] <sourcefile> \[args\] (to execute a single source-file program)](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c/comment/606c235b1ed1783ab063755e#reply-606c5d88b17dc439b747ecc9)

Reply · Article · Apr 6, 2021 · [Containerizing Spring Boot Application with Jib](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c)

[Hi Ashish, Moreover, despite configuring docker hub username and password in maven settings.xml file, we need to explicitly pass username and password when we executing build jib command. Please advise. Thanks again mvn compile jib:build -Djib.to.auth.username=user -Djib.to.auth.password=pass](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c/comment/606c235b1ed1783ab063755e#reply-606c3dd6b17dc439b747ea07)

Reply · Article · Apr 6, 2021 · [Containerizing Spring Boot Application with Jib](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c)

[Thanks Ashish for quick reply! Now connection timeout issue has been resolved. \[INFO\] Nothing to compile - all classes are up to date \[INFO\] \[INFO\] --- jib-maven-plugin:2.7.1:build (default-cli) @ spring-jib --- \[WARNING\] mainClass, extraClasspath, jvmFlags, and expandClasspathDependencies are ignored for WAR projects \[INFO\] \[INFO\] Containerizing application to senthil131720/demo... \[WARNING\] Base image 'gcr.io/distroless/java:11' does not use a specific image digest - build may not be reproducible \[INFO\] Using credentials from <to><auth> for senthil131720/demo \[INFO\] Using base image with digest: sha256:30fb7dce6b07bc81b23cdf2142cbf06e75529bd9189371e0ea39a7cf8ee09191 \[INFO\] \[INFO\] Container entrypoint set to \[/usr/bin/java, -jar\] (inherited from base image) \[INFO\] \[INFO\] Built and pushed image as senthil131720/demo \[INFO\] Executing tasks: \[INFO\] \[==============================\] 100.0% complete \[INFO\] \[INFO\] ------------------------------------------------------------------------ \[INFO\] BUILD SUCCESS \[INFO\] ------------------------------------------------------------------------ \[INFO\] Total time: 04:19 min \[INFO\] Finished at: 2021-04-06T15:48:57+05:30 \[INFO\] ------------------------------------------------------------------------ However, when i access http://localhost:8080/hello its giving below error D:\\Senthil\\Java\\spring-jib\\spring-jib>curl localhost:8080/hello {"timestamp":"2021-04-06T10:19:52.588+00:00","status":404,"error":"Not Found","message":"","path":"/hello"} SpringBoot container started and running in http 8080 port not sure why i still cant access the endpoint. Please advise Ashish Thanks again](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c/comment/606c235b1ed1783ab063755e#reply-606c39c41ed1783ab0637758)

Reply · Article · Apr 6, 2021 · [Containerizing Spring Boot Application with Jib](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c)

[Hi Ashish, I have created test account in Docker Registry. However, still getting below error. Please suggest. Build image failed, perhaps you should make sure your credentials for 'registry.hub.docker.com/senthil131720/spring-boot-jib-image' are set up correctly](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c/comment/606c235b1ed1783ab063755e#reply-606c28001ed1783ab06375c4)

Reply · Article · Apr 6, 2021 · [Containerizing Spring Boot Application with Jib](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c)

[Really Thanks Ashish for sharing about Jib!! Really its helpful!! When i done the similar kind of setup in my machine and getting the below error when i execute mvn compile jib:build command. Can you please help me? Error: D:\\Senthil\\Java\\spring-jib\\spring-jib>mvn compile jib:build \[WARNING\] \[WARNING\] Some problems were encountered while building the effective settings \[WARNING\] Unrecognised tag: 'server' (position: START\_TAG seen ...<pluginGroups/>\\r\\n <server>... @7:15) @ C:\\Users\\tssen.m2\\settings.xml, line 7, column 15 \[WARNING\] \[INFO\] Scanning for projects... \[INFO\] \[INFO\] -----------------------< com.example:spring-jib >----------------------- \[INFO\] Building spring-jib 0.0.1-SNAPSHOT \[INFO\] --------------------------------\[ war \]--------------------------------- \[INFO\] \[INFO\] --- maven-resources-plugin:3.2.0:resources (default-resources) @ spring-jib --- \[INFO\] Using 'UTF-8' encoding to copy filtered resources. \[INFO\] Using 'UTF-8' encoding to copy filtered properties files. \[INFO\] Copying 1 resource \[INFO\] Copying 0 resource \[INFO\] \[INFO\] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ spring-jib --- \[INFO\] Nothing to compile - all classes are up to date \[INFO\] \[INFO\] --- jib-maven-plugin:2.7.1:build (default-cli) @ spring-jib --- \[WARNING\] mainClass, extraClasspath, jvmFlags, and expandClasspathDependencies are ignored for WAR projects \[INFO\] \[INFO\] Containerizing application to registry.hub.docker.com/hiashish/spring-boot-jib-image... \[ERROR\] I/O error for image \[registry.hub.docker.com/hiashish/spring-boot-jib-image\]: \[ERROR\] java.net.SocketException \[ERROR\] Socket Closed \[ERROR\] I/O error for image \[registry.hub.docker.com/hiashish/spring-boot-jib-image\]: \[ERROR\] java.net.SocketException \[ERROR\] Socket Closed \[INFO\] Executing tasks: \[INFO\] \[=============== \] 50.0% complete \[INFO\] > scheduling building manifests \[INFO\] > launching layer pushers \[INFO\] > scheduling pushing container configurations \[INFO\] \[INFO\] ------------------------------------------------------------------------ \[INFO\] BUILD FAILURE \[INFO\] ------------------------------------------------------------------------ \[INFO\] Total time: 14.601 s \[INFO\] Finished at: 2021-04-06T14:21:34+05:30 \[INFO\] ------------------------------------------------------------------------ \[ERROR\] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.7.1:build (default-cli) on project spring-jib: Build image failed, perhaps you should make sure your credentials for 'registry.hub.docker.com/hiashish/spring-boot-jib-image' are set up correctly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized for help: Unauthorized for registry.hub.docker.com/hiashish/spring-boot-jib-image: 401 Unauthorized \[ERROR\] HEAD https://registry.hub.docker.com/v2/hiashish/spring-boot-jib-image/blobs/sha256:3bb6e0856b81a5b7eb18584843266c2c7bb0377054645660999d0e7ae54f773e \[ERROR\] -> \[Help 1\] \[ERROR\] \[ERROR\] To see the full stack trace of the errors, re-run Maven with the -e switch. \[ERROR\] Re-run Maven using the -X switch to enable full debug logging. \[ERROR\] \[ERROR\] For more information about the errors and possible solutions, please read the following articles: \[ERROR\] \[Help 1\] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Settings.xml: <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository/> <interactiveMode/> <offline/> <pluginGroups/> <server> <id>registry.hub.docker.com</id> <username>username</username> <password>password</password> </server> <mirrors/> <proxies/> <profiles/> <activeProfiles/> </settings>](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c/comment/606c235b1ed1783ab063755e)

Comment · Article · Apr 6, 2021 · [Containerizing Spring Boot Application with Jib](https://hashnode.com/posts/containerizing-spring-boot-application-with-jib/5fd088057b097d34759e922c)
