Advertisement
AlexanderSanch

Docker

Dec 25th, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. FROM ubuntu:latest
  2.  
  3. ENV VERSION 7.7.0
  4. ENV DISTRO tomcat
  5. ENV SERVER apache-tomcat-8.0.24
  6. ENV LIB_DIR /camunda/lib/
  7. ENV SERVER_CONFIG /camunda/conf/server.xml
  8. ENV NEXUS https://app.camunda.com/nexus/service/local/artifact/maven/redirect
  9. ENV TERM xterm
  10.  
  11. WORKDIR /camunda
  12.  
  13. ADD bin/* /usr/local/bin/
  14.  
  15. # install oracle java and generate locale
  16. RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/oracle-jdk.list && \
  17. apt-key adv --recv-keys --keyserver keyserver.ubuntu.com EEA14886 && \
  18. echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
  19. apt-get update && \
  20. apt-get -y install --no-install-recommends oracle-java8-installer xmlstarlet ca-certificates locales && \
  21. apt-get -y install nano less && \
  22. locale-gen ru_RU.KOI8-R && \
  23. apt-get clean && \
  24. rm -rf /var/cache/* /var/lib/apt/lists/*
  25.  
  26. # set language to russian
  27. ENV LANG ru_RU.KOI8-R
  28.  
  29. # correct timezone
  30. RUN ln -sf /usr/share/zoneinfo/Asia/Yekaterinburg /etc/localtime
  31.  
  32. # add camunda distro
  33. RUN wget -O - "${NEXUS}?r=public&g=org.camunda.bpm.${DISTRO}&a=camunda-bpm-${DISTRO}&v=${VERSION}&p=tar.gz" | \
  34. tar xzf - -C /camunda/ server/${SERVER} --strip 2
  35.  
  36. # add scripts
  37. ADD script/* /camunda/webapps/engine-rest/WEB-INF/classes/script/
  38.  
  39. # add database drivers
  40. RUN /usr/local/bin/download-database-drivers.sh "${NEXUS}?r=public&g=org.camunda.bpm&a=camunda-database-settings&v=${VERSION}&p=pom"
  41.  
  42. EXPOSE 8080
  43.  
  44. RUN /usr/bin/xmlstarlet ed -P -S -L -s /web-app -t elem -n resource-ref -v "" \
  45. -i //resource-ref -t attr -n "res-ref-name" -v "jdbc/camundaLog" \
  46. -i //resource-ref -t attr -n "res-type" -v "avax.sql.DataSource" \
  47. -i //resource-ref -t attr -n "res-auth" -v "Container" \
  48. /camunda/webapps/engine-rest/WEB-INF/web.xml
  49.  
  50. CMD ["/usr/local/bin/configure-and-run.sh"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement