File tree 3 files changed +27
-10
lines changed
3 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 1
- # ###########################################################
2
- # Dockerfile to build Nginx Installed Containers
3
- # Based on Ubuntu
4
- # ###########################################################
5
-
6
1
# Set the base image to Ubuntu
7
2
FROM ubuntu
8
3
9
4
# File Author / Maintainer
10
- MAINTAINER Anand
M.S <[email protected] >
5
+ MAINTAINER Anand Mani Sankar
11
6
12
7
# Install Nginx
13
8
@@ -35,6 +30,5 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf
35
30
# Expose ports
36
31
EXPOSE 80
37
32
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
40
34
CMD service nginx start
Original file line number Diff line number Diff line change
1
+ # Set the base image to Ubuntu
1
2
FROM ubuntu
2
- MAINTAINER Anand M.S <
[email protected] >
3
3
4
+ # File Author / Maintainer
5
+ MAINTAINER Anand Mani Sankar
4
6
7
+ # Update the repository
5
8
RUN apt-get update
9
+
10
+ # Install the dependencies
6
11
RUN apt-get -y install curl
7
12
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
8
13
RUN apt-get -y install python build-essential
14
+
15
+ # Install nodejs
9
16
RUN apt-get -y install nodejs
10
- # RUN ln -s /usr/bin/nodejs /usr/bin/node
17
+
18
+ # Check node and npm versions
11
19
RUN node -v
12
20
RUN npm -v
13
21
22
+ # Install nodemon
14
23
RUN npm install -g nodemon
15
24
16
25
# Bundle app source
17
26
COPY . /src
27
+
18
28
# Install app dependencies
19
29
RUN cd /src; npm install
20
30
31
+ # Expose port
21
32
EXPOSE 8080
33
+
34
+ # Run app using nodemon
22
35
CMD ["nodemon" , "/src/index.js" ]
Original file line number Diff line number Diff line change
1
+ # Set the base image to Ubuntu
1
2
FROM ubuntu
3
+
4
+ # File Author / Maintainer
5
+ MAINTAINER Anand Mani Sankar
6
+
7
+ # Update the repository and install Redis Server
2
8
RUN apt-get update && apt-get install -y redis-server
9
+
10
+ # Expose Redis port 6379
3
11
EXPOSE 6379
12
+
13
+ # Run Redis Server
4
14
ENTRYPOINT ["/usr/bin/redis-server" ]
You can’t perform that action at this time.
0 commit comments