dockerfile build and run

This commit is contained in:
Jaromil 2018-10-05 15:12:13 +02:00
parent 4c033ac86c
commit 7fce1b2cde
3 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,19 @@
FROM dyne/clojure
LABEL maintainer="Denis Roio <jaromil@dyne.org>" \
homepage="https://github.com/dyne/agiladmin"
# ENV VERSION=AUTO_STRICT
EXPOSE 3000
WORKDIR /app
COPY . /app
RUN mkdir -p /usr/share/man/man1/ \
&& apt-get update \
&& apt-get install -y -q --allow-downgrades --no-install-recommends \
mongodb \
&& apt-get clean \
&& lein deps
CMD /etc/init.d/mongodb start \
&& lein ring server-headless

11
clojure_frontend/docker/build Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
target="$1"
if [ "$target" = "" ]; then target=develop; fi
if test -d src/toaster; then
docker build -f docker/Dockerfile -t dyne/toaster.do:$target .
else
echo "Launch from base source directiory. Usage:"
echo "./docker/build"
fi

5
clojure_frontend/docker/run Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
target="$1"
if [ "$target" = "" ]; then target=develop; fi
docker run -p 3000:3000 -it dyne/toaster.do:$target $*