daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Jan 20th, 2017 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # LICENSE CDDL 1.0 + GPL 2.0
  2. #
  3. # Copyright (c) 2014-2015 Oracle and/or its affiliates. All rights reserved.
  4. #
  5. # ORACLE DOCKERFILES PROJECT
  6. # --------------------------
  7. # This Dockerfile extends the Oracle WebLogic image by creating a sample domain.
  8. #
  9. # The 'base-domain' created here has Java EE 7 APIs enabled by default:
  10. #  - JAX-RS 2.0 shared lib deployed
  11. #  - JPA 2.1,
  12. #  - WebSockets and JSON-P
  13. #
  14. # Util scripts are copied into the image enabling users to plug NodeManager
  15. # magically into the AdminServer running on another container as a Machine.
  16. #
  17. # HOW TO BUILD THIS IMAGE
  18. # -----------------------
  19. # Put all downloaded files in the same directory as this Dockerfile
  20. # Run:
  21. #      $ sudo docker build -t 1213-domain --build-arg ADMIN_PASSWORD=welcome1 .
  22. #
  23.  
  24. # Pull base image
  25. # ---------------
  26. FROM oracle/weblogic:12.1.3-developer
  27.  
  28. # Maintainer
  29. # ----------
  30. MAINTAINER Bruno Borges <bruno.borges@oracle.com>
  31.  
  32. # WLS Configuration
  33. # -------------------------------
  34. ARG ADMIN_PASSWORD
  35. ENV DOMAIN_NAME="base_domain"
  36.     DOMAIN_HOME="/u01/oracle/user_projects/domains/base_domain"
  37.     JAVA_OPTIONS="${JAVA_OPTIONS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -server -XX:PermSize=512m -XX:MaxPermSize=512m -Dapplication.properties.location=/u01/oracle/user_projects/domains/base_domain -DFundCenterProperties.Location=/u01/oracle/user_projects/domains/base_domain/FundCenterProperties.xml -Dlog4j.configuration=file:/u01/oracle/user_projects/domains/base_domain/log4j.properties"
  38.     ADMIN_PORT="7007"
  39.     ADMIN_HOST="wlsadmin"
  40.     NM_PORT="5556"
  41.     MS_PORT="7003"
  42.     CONFIG_JVM_ARGS="-Dweblogic.security.SSL.ignoreHostnameVerification=true"
  43.     PATH=$PATH:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/u01/oracle/user_projects/domains/base_domain/bin:/u01/oracle
  44.  
  45. # Add files required to build this image
  46. USER root
  47. COPY container-scripts/* /u01/oracle/
  48.  
  49.  
  50. USER oracle
  51. # Configuration of WLS Domain
  52. WORKDIR /u01/oracle
  53. RUN /u01/oracle/wlst /u01/oracle/create-wls-domain.py &&
  54.     mkdir -p /u01/oracle/user_projects/domains/base_domain/servers/AdminServer/security &&
  55.     echo "username=weblogic" > /u01/oracle/user_projects/domains/base_domain/servers/AdminServer/security/boot.properties &&  
  56.     echo "password=$ADMIN_PASSWORD" >> /u01/oracle/user_projects/domains/base_domain/servers/AdminServer/security/boot.properties &&
  57.     echo ". /u01/oracle/user_projects/domains/base_domain/bin/setDomainEnv.sh" >> /u01/oracle/.bashrc &&  
  58.     echo "export PATH=$PATH:/u01/oracle/wlserver/common/bin:/u01/oracle/user_projects/domains/base_domain/bin" >> /u01/oracle/.bashrc &&
  59.     cp /u01/oracle/commEnv.sh /u01/oracle/wlserver/common/bin/commEnv.sh &&
  60.     rm /u01/oracle/create-wls-domain.py /u01/oracle/jaxrs2-template.jar
  61.  
  62.  
  63. COPY log4j.properties /u01/oracle/user_projects/domains/base_domain/
  64.  
  65. EXPOSE $NM_PORT $ADMIN_PORT $MS_PORT 5005
  66. # Expose Node Manager default port, and also default http/https ports for admin console
  67.  
  68. WORKDIR $DOMAIN_HOME
  69.  
  70.  
  71. # Define default command to start bash.
  72. CMD ["startWebLogic.sh"]
  73.    
  74. docker run -d --name webapp -p 7007:7007 -p 7003:7003 -p 5556:5556 -v /c/webapp:/webapp 1213-domain
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top