Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # original source seems to be gone from github
- # so modifying Dockerfile from docker hub
- # https://hub.docker.com/r/exadatum/yeoman/~/dockerfile/
- ###############################################################################
- # Header Documentation #
- ###############################################################################
- #
- # Dockerfile to create container with following tools
- # - Yeoman
- # - Yeoman Karma Generator
- # - Yeoman Angular Generator
- # - Yeoman JHipster Generator
- # - Yeoman Alfresco Generator
- # - Bower
- # - Grunt-Cli
- # - Gulp
- #
- ###############################################################################
- # Header #
- ###############################################################################
- FROM ubuntu:16.04
- ###############################################################################
- # Environment Variables #
- ###############################################################################
- # Tar files for pythong and nodejs are downloaded to tmp directory
- ENV TMP_DIR /tmp
- # Docker user to be created to intereact with container. This user is
- # different than root
- ENV DOCKER_USER=docker
- # Password for the user defined by DOCKER_USER environment
- # variable
- ENV DOCKER_USER_PASSWORD=docker
- # Password for the root
- ENV ROOT_USER_PASSWORD=root
- RUN apt-get update && apt-get -y install software-properties-common
- RUN \
- echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
- add-apt-repository -y ppa:webupd8team/java && \
- apt-get update && \
- apt-get install -y oracle-java8-installer
- RUN apt-get -y install maven
- RUN apt-get install -y wget build-essential
- RUN apt-get install -y libreadline-gplv2-dev libncursesw5-dev
- RUN apt-get install -y libssl-dev libsqlite3-dev tk-dev
- RUN apt-get install -y libgdbm-dev libc6-dev libbz2-dev
- # Set the current work directory to /tmp directory
- WORKDIR ${TMP_DIR}
- # Download python 2.7.5 tar.
- # It will be downloaded to temp directory which is current work directory
- RUN wget http://python.org/ftp/python/2.7.5/Python-2.7.5.tgz
- # Extract downloaded python tar file in previous step.
- # It will be extracted to Python-2.7.5 directory which is inside /tmp directory
- RUN tar -xf Python-2.7.5.tgz
- # To build python, change the current working directory to directory where
- # python source code is extracted.
- WORKDIR ${TMP_DIR}/Python-2.7.5/
- #Build python 2.7.5 source code and install it
- RUN ./configure
- RUN make
- RUN make install
- # Change the current work directory back to /tmp directory
- WORKDIR ${TMP_DIR}
- # Download nodejs 0.12.2 tar.
- # It will be downloaded to temp directory which is current work directory
- RUN wget https://github.com/joyent/node/archive/v0.12.2.tar.gz
- # Extract downloaded nodejs tar file in previous step.
- # It will be extracted to node-0.12.2 directory which is inside /tmp directory
- RUN tar -xf v0.12.2.tar.gz
- # To build nodejs, change the current working directory to directory where
- # nodejs source code is extracted.
- WORKDIR ${TMP_DIR}/node-v0.x-archive-0.12.2/
- #Build nodejs 0.12.2 source code and install it
- RUN ./configure
- RUN make
- RUN make install
- RUN apt-get install -y git
- RUN npm install -g npm
- # Install following components using npm
- # - Yeoman
- # - Yeoman Karma Generator
- # - Yeoman Angular Generator
- # - Yeoman JHipster Generator
- # - Bower
- # - Grunt-Cli
- # - Gulp
- RUN npm install -g yo bower grunt-cli gulp generator-karma
- RUN npm install -g generator-angular generator-jhipster
- # bindu generator
- RUN npm install -g binduwavell/generator-alfresco
- # for dev sanity do this as late as possible
- RUN rm -rf /var/lib/apt/lists/*
- RUN rm -rf /var/cache/oracle-jdk8-installer
- # Set the root password
- RUN echo "root:${ROOT_USER_PASSWORD}" | chpasswd
- # Create new user called define by DOCKER_USER environment variable
- # which will be able to work with yeoman.
- # Following issue prohibits using root with yo command
- # https://github.com/yeoman/yeoman.io/issues/282
- RUN adduser --disabled-password --shell /bin/bash --gecos '' ${DOCKER_USER}
- # Add user defined by DOCKER_USER environment variable to the sudoers list
- RUN adduser ${DOCKER_USER} sudo
- # Set the work directory
- RUN mkdir /work
- WORKDIR /work
- # Set the user id
- USER ${DOCKER_USER}
- VOLUME /work
- ENTRYPOINT ["yo"]
- ###############################################################################
- # End #
- ###############################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement