I have build docker image from below:
FROM rocker/r-ubuntu:20.04
LABEL maintainer="Utkarsh Saraf"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y software-properties-common \
apt-utils \
libxml2-dev \
openjdk-8-jdk \
build-essential \
libcurl4-gnutls-dev \
libssl-dev \
openssh-server && \
apt-get clean
WORKDIR /app
COPY . /app
COPY start.sh /start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["sh","/app/startup.sh"]
In startup.sh, following code contains:
java web-app.jar &
How to execute shell file.