Thanks Mike,
I admit I'm used to thinking of HOME to be a place where we find a bin folder which led to my confusion.
So for record.. I got it working although with one caveat,, I had to cp stardog-license-key.bin into the directory where i mapped the STARDOG_HOME volume /data/stardog as stardog would not see the one that used COPY stardog-license-key.bin /storage/stardog-license-key.bin to place in the container. Probably some issue related to volumes that I need to read up on.
RUN mkdir -p /storage/logs
ENV STARDOG_HOME /storage
ENV DATA_DIR /data
RUN mkdir /data
RUN mkdir /properties
RUN mkdir /stardog
ENV STARDOG_JAVA_ARGS -Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g
COPY stardog.zip /stardog/stardog.zip
RUN unzip /stardog/stardog.zip
RUN mv /stardog-4.0-RC1/ /stardog_binaries/
#Note must sudo cp stardog-license-key.bin /data/stardog as it is not recognized using COPY for some reason
COPY stardog-license-key.bin /storage/stardog-license-key.bin
COPY database.properties /properties/database.properties
#CLEANUP
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /stardog/
WORKDIR /stardog_binaries
# Making stardog-admin and database files accessible
VOLUME /storage
EXPOSE 5820
CMD bin/stardog-admin server start && \
sleep 5 && \
bin/stardog-admin db create -c /properties/database.properties && \
(tail -f /storage/stardog.log &) && \
while (pidof java > /dev/null); do sleep 1; done