Search code examples
javaspring-bootdockergoogle-cloud-shell

Docker build command hangs in Google Cloud Shell without any message


I'm trying to build a Springboot webapp docker image in Google Cloud Shell. But the build command hangs without any message in the terminal. Please help.

Dockerfile:

FROM openjdk:8-jre-alpine
RUN mkdir /app
WORKDIR /app
ADD target/inventory-service-0.0.1-SNAPSHOT.jar app.jar
CMD java -jar app.jar

Build command hanging in Google Cloud Shell:

Docker build command hanging in the Google Cloud Shell


Solution

  • Finally the image got built after a long time. But just wondering why it took more than 15 mins for just downloading 17.6 MB base image. Anyway the issue got resolved just by taking more time.