Advertisement
Guest User

alfrescYO

a guest
Jun 5th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.74 KB | None | 0 0
  1.  
  2.  
  3. # original source seems to be gone from github
  4. # so modifying Dockerfile from docker hub
  5. # https://hub.docker.com/r/exadatum/yeoman/~/dockerfile/
  6.  
  7.  
  8. ###############################################################################
  9. # Header Documentation #
  10. ###############################################################################
  11. #
  12. # Dockerfile to create container with following tools
  13. # - Yeoman
  14. # - Yeoman Karma Generator
  15. # - Yeoman Angular Generator
  16. # - Yeoman JHipster Generator
  17. # - Yeoman Alfresco Generator
  18. # - Bower
  19. # - Grunt-Cli
  20. # - Gulp
  21. #
  22. ###############################################################################
  23. # Header #
  24. ###############################################################################
  25.  
  26. FROM ubuntu:16.04
  27.  
  28.  
  29. ###############################################################################
  30. # Environment Variables #
  31. ###############################################################################
  32.  
  33. # Tar files for pythong and nodejs are downloaded to tmp directory
  34. ENV TMP_DIR /tmp
  35.  
  36. # Docker user to be created to intereact with container. This user is
  37. # different than root
  38. ENV DOCKER_USER=docker
  39.  
  40. # Password for the user defined by DOCKER_USER environment
  41. # variable
  42. ENV DOCKER_USER_PASSWORD=docker
  43.  
  44. # Password for the root
  45. ENV ROOT_USER_PASSWORD=root
  46.  
  47.  
  48. RUN apt-get update && apt-get -y install software-properties-common
  49. RUN \
  50. echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
  51. add-apt-repository -y ppa:webupd8team/java && \
  52. apt-get update && \
  53. apt-get install -y oracle-java8-installer
  54.  
  55. RUN apt-get -y install maven
  56. RUN apt-get install -y wget build-essential
  57. RUN apt-get install -y libreadline-gplv2-dev libncursesw5-dev
  58. RUN apt-get install -y libssl-dev libsqlite3-dev tk-dev
  59. RUN apt-get install -y libgdbm-dev libc6-dev libbz2-dev
  60.  
  61. # Set the current work directory to /tmp directory
  62. WORKDIR ${TMP_DIR}
  63.  
  64. # Download python 2.7.5 tar.
  65. # It will be downloaded to temp directory which is current work directory
  66. RUN wget http://python.org/ftp/python/2.7.5/Python-2.7.5.tgz
  67.  
  68. # Extract downloaded python tar file in previous step.
  69. # It will be extracted to Python-2.7.5 directory which is inside /tmp directory
  70. RUN tar -xf Python-2.7.5.tgz
  71.  
  72. # To build python, change the current working directory to directory where
  73. # python source code is extracted.
  74. WORKDIR ${TMP_DIR}/Python-2.7.5/
  75.  
  76. #Build python 2.7.5 source code and install it
  77. RUN ./configure
  78. RUN make
  79. RUN make install
  80.  
  81. # Change the current work directory back to /tmp directory
  82. WORKDIR ${TMP_DIR}
  83.  
  84. # Download nodejs 0.12.2 tar.
  85. # It will be downloaded to temp directory which is current work directory
  86. RUN wget https://github.com/joyent/node/archive/v0.12.2.tar.gz
  87.  
  88. # Extract downloaded nodejs tar file in previous step.
  89. # It will be extracted to node-0.12.2 directory which is inside /tmp directory
  90. RUN tar -xf v0.12.2.tar.gz
  91.  
  92. # To build nodejs, change the current working directory to directory where
  93. # nodejs source code is extracted.
  94. WORKDIR ${TMP_DIR}/node-v0.x-archive-0.12.2/
  95.  
  96. #Build nodejs 0.12.2 source code and install it
  97. RUN ./configure
  98. RUN make
  99. RUN make install
  100.  
  101.  
  102. RUN apt-get install -y git
  103. RUN npm install -g npm
  104.  
  105. # Install following components using npm
  106. # - Yeoman
  107. # - Yeoman Karma Generator
  108. # - Yeoman Angular Generator
  109. # - Yeoman JHipster Generator
  110. # - Bower
  111. # - Grunt-Cli
  112. # - Gulp
  113. RUN npm install -g yo bower grunt-cli gulp generator-karma
  114. RUN npm install -g generator-angular generator-jhipster
  115.  
  116.  
  117. # bindu generator
  118. RUN npm install -g binduwavell/generator-alfresco
  119.  
  120.  
  121. # for dev sanity do this as late as possible
  122. RUN rm -rf /var/lib/apt/lists/*
  123. RUN rm -rf /var/cache/oracle-jdk8-installer
  124.  
  125.  
  126. # Set the root password
  127. RUN echo "root:${ROOT_USER_PASSWORD}" | chpasswd
  128.  
  129. # Create new user called define by DOCKER_USER environment variable
  130. # which will be able to work with yeoman.
  131. # Following issue prohibits using root with yo command
  132. # https://github.com/yeoman/yeoman.io/issues/282
  133. RUN adduser --disabled-password --shell /bin/bash --gecos '' ${DOCKER_USER}
  134.  
  135. # Add user defined by DOCKER_USER environment variable to the sudoers list
  136. RUN adduser ${DOCKER_USER} sudo
  137.  
  138.  
  139. # Set the work directory
  140. RUN mkdir /work
  141. WORKDIR /work
  142.  
  143. # Set the user id
  144. USER ${DOCKER_USER}
  145.  
  146. VOLUME /work
  147.  
  148. ENTRYPOINT ["yo"]
  149.  
  150.  
  151. ###############################################################################
  152. # End #
  153. ###############################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement