Skip to content

Commit 7258f99

Browse files
committed
Updating Dockerfiles with comments
1 parent d3dc689 commit 7258f99

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

nginx/Dockerfile

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
############################################################
2-
# Dockerfile to build Nginx Installed Containers
3-
# Based on Ubuntu
4-
############################################################
5-
61
# Set the base image to Ubuntu
72
FROM ubuntu
83

94
# File Author / Maintainer
10-
MAINTAINER Anand M.S <[email protected]>
5+
MAINTAINER Anand Mani Sankar
116

127
# Install Nginx
138

@@ -35,6 +30,5 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf
3530
# Expose ports
3631
EXPOSE 80
3732

38-
# Set the default command to execute
39-
# when creating a new container
33+
# Set the default command to execute when creating a new container
4034
CMD service nginx start

node/Dockerfile

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
1+
# Set the base image to Ubuntu
12
FROM ubuntu
2-
MAINTAINER Anand M.S <[email protected]>
33

4+
# File Author / Maintainer
5+
MAINTAINER Anand Mani Sankar
46

7+
# Update the repository
58
RUN apt-get update
9+
10+
# Install the dependencies
611
RUN apt-get -y install curl
712
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
813
RUN apt-get -y install python build-essential
14+
15+
# Install nodejs
916
RUN apt-get -y install nodejs
10-
# RUN ln -s /usr/bin/nodejs /usr/bin/node
17+
18+
# Check node and npm versions
1119
RUN node -v
1220
RUN npm -v
1321

22+
# Install nodemon
1423
RUN npm install -g nodemon
1524

1625
# Bundle app source
1726
COPY . /src
27+
1828
# Install app dependencies
1929
RUN cd /src; npm install
2030

31+
# Expose port
2132
EXPOSE 8080
33+
34+
# Run app using nodemon
2235
CMD ["nodemon", "/src/index.js"]

redis/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
# Set the base image to Ubuntu
12
FROM ubuntu
3+
4+
# File Author / Maintainer
5+
MAINTAINER Anand Mani Sankar
6+
7+
# Update the repository and install Redis Server
28
RUN apt-get update && apt-get install -y redis-server
9+
10+
# Expose Redis port 6379
311
EXPOSE 6379
12+
13+
# Run Redis Server
414
ENTRYPOINT ["/usr/bin/redis-server"]

0 commit comments

Comments
 (0)