Skip to content

Commit b4f69f6

Browse files
authored
Merge pull request #57 from japrogramer/Dockerize
Added Docker file with some doc
2 parents 97714df + 04847c4 commit b4f69f6

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#FROM ubuntu:16.04
2+
FROM node:alpine
3+
RUN mkdir -p /app
4+
COPY . /app
5+
WORKDIR /app
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
8+
RUN apk update \
9+
&& apk upgrade \
10+
&& apk add --no-cache bash git openssh \
11+
&& npm install -g bower \
12+
&& npm install \
13+
&& chown -R node:node /app \
14+
&& npm rebuild node-sass \
15+
&& npm cache clean --force
16+
17+
USER node
18+
WORKDIR /app
19+
RUN bower install
20+
21+
EXPOSE 4000
22+
23+
CMD ["npm", "start"]
24+

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ AngularJS, Angular2, React and Meteor versions are coming soon.
4444

4545
* [Browser support](#browser-support)
4646
* [Development](#development)
47+
* [Docker](#docker)
4748
* [Folder structure](#folder-structure)
4849
* [File types](#file-types)
4950
* [Build tasks](#build-tasks)
@@ -61,6 +62,22 @@ AngularJS, Angular2, React and Meteor versions are coming soon.
6162
Some of the components use the new Flexbox Layout module which is available in most modern browsers. Bootstrap4 is used as main framework. Please make sure that it's suitable for you: [Flexbox browser support](http://caniuse.com/#feat=flexbox).
6263

6364
<br>
65+
66+
## Docker
67+
68+
To build the container, you need to install docker and docker-compose than launch the docker daemon.
69+
After launching the daemon run the following commands from the project folder:
70+
71+
Build the image
72+
```
73+
docker-compose build
74+
```
75+
76+
Launch the container
77+
```
78+
docker-compose up
79+
```
80+
6481
## Development
6582

6683
For building the application, you need to have [NodeJs](https://nodejs.org/en/) with npm. You also need to have [Bower](http://bower.io/) installed globally.

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: '3'
2+
3+
services:
4+
node:
5+
build:
6+
context: .
7+
volumes:
8+
- .:/app
9+
# http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html
10+
- /app/node_modules
11+
ports:
12+
# BrowserSync port.
13+
- "4000:4000"
14+

0 commit comments

Comments
 (0)