I created a docker image from openjdk:8-jdk-alpine but when I try to execute simple commands I get the following errors:
RUN bash
/bin/sh: bash: not found
RUN ./gradlew build
env: can't execute 'bash': No such file or directory
To Install bash you can do:
RUN apk add --update bash && rm -rf /var/cache/apk/*
If you do not want to add extra size to your image, you can use ash
or sh
that ships with alpine.
Reference: https://github.com/smebberson/docker-alpine/issues/43
docker run --rm -i -t alpine /bin/sh
– Nabil Kadimi