Following are the key points described later in this article:
Following tools are installed to make Javascript development environment.
Following dockerfile (nodejs_base.df) could be used to create NodeJS base image and represents NodeJS runtime.
# Use centos6 base image
FROM centos:centos6
# Enable Extra Packages for Enterprise Linux (EPEL) for CentOS
RUN yum install -y epel-release
# Install Node.js and npm
RUN yum install -y nodejs npm
Following Dockerfile (javascript.df) is used to create Javascript Dev Environment image representing following tools:
FROM nodejs_base
# Install Typescript
RUN npm install -g typescript
# Install Grunt CLI
RUN npm install -g grunt-cli
# Install Bower
RUN npm install -g bower
# Install jshint
RUN npm install -g jshint
# Install Browserify
RUN npm install -g browserify
# Install JSCS
RUN npm install -g jscs
# Install Jasmine
RUN npm install -g jasmine
RUN mkdir /spec
RUN mkdir /spec/support
RUN jasmine init
Following script (installJS.sh) could be used to create Javascript Dev environment. It includes following:
#!/bin/sh
if [ $# == 0 ]; then
echo "This script expect container name argument. Example: ./installTS.sh jsdev"
exit 100
fi
docker stop $1;docker rm $1
# Build NodeJS image if it does not exists
#
nb_image="nodejs_base"
nb_df="nodejs_base.df"
if [ `docker images $nb_image | wc -l` -lt 2 ]; then
echo "Docker Image $nb_image do not exist..."
echo "Builing docker image $nb_image"
if [ -f $nb_df ]; then
docker build -t $nb_image -f $nb_df .
else
echo "Can't find Dockerfile $nb_df in the current location"
exit 200
fi
fi
# Build Typescript image if it does not exists
#
js_image="javascript"
js_df="javascript.df"
if [ `docker images $js_image | wc -l` -lt 2 ]; then
echo "Docker Image $js_image do not exist..."
echo "Builing docker image $js_image"
if [ -f $js_df ]; then
docker build -t $js_image -f $js_df .
else
echo "Can't find Dockerfile $js_df in the current location"
exit 200
fi
fi
docker run --privileged=true -ti -dP --name $1 -v /c/Users:/mnt/Users $js_image /bin/bash
Last updated: 2nd May, 2024 The success of machine learning models often depends on the…
When working on a machine learning project, one of the key challenges faced by data…
Last updated: 1st May, 2024 The bias-variance trade-off is a fundamental concept in machine learning…
Last updated: 1st May, 2024 As a data scientist, understanding the nuances of various cost…
Last updated: 1st May, 2024 In this post, you will learn the concepts related to…
Last updated: 26th April, 2024 In this blog post, we will discuss the logistic regression…