Skip to content

Commit 6ab16b6

Browse files
committed
Initial commit
0 parents  commit 6ab16b6

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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/``

0 commit comments

Comments
 (0)