File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM node:argon
2
+
3
+ MAINTAINER Aleksei Chernov <
[email protected] >
4
+
5
+ # Do the job in one command to save disk space by preventing creation of unneeded layers and
6
+ RUN apt-get update \
7
+ && apt-get install -y nginx \
8
+ && rm -r /var/www/html/* \
9
+ && npm i -q -g npm3
Original file line number Diff line number Diff line change
1
+ # node-nginx-npm3
2
+ ## Minimalistic Docker image for running static websites
3
+ Includes Node LTS, Nginx and both npm 2 and npm 3 as some projects reiquire specific npm version
4
+
5
+ ###Usage
6
+ Create Dockerfile
7
+ ```
8
+ FROM kotlex/node-nginx-npm3:latest
9
+
10
+ # Copy source files to nginx docroot
11
+ COPY . /var/www/html
12
+
13
+ # Run server
14
+ CMD ["nginx", "-g", "daemon off;"]
15
+ ```
16
+
17
+ Build an image:
18
+ `` docker build --tag mysite . ``
19
+
20
+ Run container:
21
+ `` docker run -p 8080:80 mysite ``
22
+
23
+ Test it:
24
+ `` curl http://localhost:8080/ ``
You can’t perform that action at this time.
0 commit comments