forked from sedici/docker-dspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (51 loc) · 2.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# NAME: arieljlira/dspace
FROM tomcat:8.5-jre8-slim
LABEL maintainer "[email protected]"
# DEBIAN_FRONTEND can be set during build but not in ENV (https://github.com/moby/moby/issues/4032)
ARG DEBIAN_FRONTEND=noninteractive
# TODO revisar si estos ENVs de postgres tienen que estar en el dockerfile o no
ENV POSTGRES_DB_HOST "dspace_db"
ENV POSTGRES_DB_PORT "5432"
ENV POSTGRES_DB_NAME "dspace"
ENV POSTGRES_DB_USER "dspace"
ENV POSTGRES_DB_PASS "dspace"
ENV DSPACE_GIT_URL=https://github.com/DSpace/DSpace
ENV DSPACE_GIT_REVISION=dspace-6.3
ENV DSPACE_WEBAPPS="jspui xmlui mirage2 rest oai rdf sword swordv2"
ENV DSPACE_ROOT_WEBAPP=""
#quizás DSPACE_BASE deba ir a bashrc para no ser customizable
ENV DSPACE_BASE=/dspace
ENV PATH=${CATALINA_HOME}/bin:${DSPACE_BASE}/install/bin:$PATH \
CATALINA_OPTS="-Xmx512M -Dfile.encoding=UTF-8"
ENV BOOTSTRAP_DUMP "${DSPACE_BASE}/bootstrap-dump.sql"
#workaround for slim issue https://github.com/debuerreotype/debuerreotype/issues/10
#workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866729
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y --no-install-recommends git openjdk-8-jdk ant maven postgresql-client \
procps curl sudo gpg
#imagemagick ghostscript \
#net-tools bash-completion mlocate nano less procps apt-utils \
#apache2
RUN apt-get autoremove -y && apt-get clean
WORKDIR ${DSPACE_BASE}
#set up tomcat
RUN rm -rf $CATALINA_HOME/webapps/*
# Install root filesystem
COPY rootfs /
RUN echo "Debian GNU/Linux `cat /etc/debian_version` image. (`uname -rsv`)" >> /root/.built \
&& echo "- with `java -version 2>&1 | awk 'NR == 2'`" >> /root/.built \
&& echo "\nNote: if you need to run commands interacting with DSpace enter the" >> /root/.built \
&& echo "container with: docker exec -it dspace /bin/bash" >> /root/.built
VOLUME $DSPACE_BASE/.m2/
VOLUME ${DSPACE_BASE}
EXPOSE 8080
CMD ["start"]
ENTRYPOINT ["dspace-manager.sh"]
# FIXME agregar user dspace
# ARG DSPACE_USER
# DSPACE_USER=${DSPACE_USER:-dspace} \
# RUN useradd --home-dir $DSPACE_BASE --create-home --shell /bin/bash $DSPACE_USER
# RUN chown -R $DSPACE_USER.$DSPACE_USER $CATALINA_HOME
# RUN chown -R $DSPACE_USER.$DSPACE_USER $DSPACE_BASE
# USER $DSPACE_USER