FROM openjdk:8-jre

LABEL maintainer="Monogramm Maintainers <opensource at monogramm dot io>"

ENV LANG=en_US.UTF-8 \
    LC_ALL=C.UTF-8

RUN set -ex; \
    wget https://download.clojure.org/install/linux-install-1.10.0.442.sh; \
    chmod +x linux-install-1.10.0.442.sh; \
    ./linux-install-1.10.0.442.sh; \
    rm -rf linux-install-1.10.0.442.sh

RUN set -ex; \
    apt-get update -yq &&  \
    apt-get install -yq \
        git \
        imagemagick \
        webp

COPY ./entrypoint.sh /entrypoint.sh
COPY ./dist /srv/uxbox

RUN set -ex; \
    chmod 755 /entrypoint.sh; \
    mkdir -p /srv/uxbox/resources/media

VOLUME /srv/uxbox/resources/public
WORKDIR /srv/uxbox/

EXPOSE 6060

ENTRYPOINT ["sh", "/entrypoint.sh"]
CMD ["clojure", "-m", "uxbox.main"]

FROM openjdk:8-jre

LABEL maintainer="Monogramm Maintainers <opensource at monogramm dot io>"

ENV CLOJURE_VERSION=1.10.0.442 \
    LANG=en_US.UTF-8 \
    LC_ALL=C.UTF-8

RUN set -ex; \
    wget "https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh"; \
    chmod +x "linux-install-$CLOJURE_VERSION.sh"; \
    "./linux-install-$CLOJURE_VERSION.sh"; \
    rm -rf "linux-install-$CLOJURE_VERSION.sh"

RUN set -ex; \
    apt-get update -yq &&  \
    apt-get install -yq \
        git \
        imagemagick \
        webp

COPY ./entrypoint.sh /entrypoint.sh
COPY ./dist /srv/uxbox

RUN set -ex; \
    chmod 755 /entrypoint.sh; \
    mkdir -p /srv/uxbox/resources/media

VOLUME /srv/uxbox/resources/public
WORKDIR /srv/uxbox/

EXPOSE 6060

ENTRYPOINT ["sh", "/entrypoint.sh"]
CMD ["clojure", "-m", "uxbox.main"]

Add variable for Clojure version
:art: Add variable for Clojure version

Signed-off-by: mathieu.brunot <f658874c95166cb27d0689bae52e726ba7d102bf@gmail.com>
