0

container builds successfully but throws error when starting the stack

/bin/sh: 1: ./gradlew: not found

here is my Dockerfile :

FROM arm32v7/openjdk:7

WORKDIR /iotproject

CMD GRADLE_USER_HOME=cache ./gradlew run

dockercompose :

version : "3.6"

services:
  server:
    build: ./iotproject
    restart: always
    container_name: server
    volumes:
      - ./volumes/server:/iotproject

Things i tried : setting permissions & owner. still no luck

  • Did you connect to the container's bash and inspected if gradlew is in its expected place? – tnte Apr 06 '21 at 19:32
  • Will this help you? https://stackoverflow.com/a/61131308/5050667 – Yassin Hajaj Apr 06 '21 at 19:33
  • @tnte yes i wanted to do that but the container keeps restarting since its failing and as i have set it to restart always, i am unable to pause the container to actually get inside. any workaround for this? – ishank kumar Apr 07 '21 at 05:44
  • Maybe make temporary Image without the CMD execution and connect to it for inspection of files. Then you should know if its there or not – tnte Apr 07 '21 at 07:28
  • what is the output of `ls ./volumes/server`? – Sasha Shpota May 04 '21 at 11:53

0 Answers0