Skip to content

Commit 1646968

Browse files
author
Robert Kleger
committed
update readme with docker; add dockerignore file
1 parent eda4ec8 commit 1646968

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

. dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.vscode
2+
node_modules
3+
test
4+
.editorconfig
5+
.env.example
6+
.gitignore
7+
.travis.yml
8+
appveyor.yml
9+
icon.png
10+
LICENSE
11+
README.md

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,50 @@ The last step is the easiest, just hit the following command in your terminal, b
371371
npm start db.seed
372372
```
373373
374+
## Run in Docker container
375+
376+
### Install Docker
377+
378+
Before you start, make sure you have a recent version of [Docker](https://docs.docker.com/engine/installation/) installed
379+
380+
### Build Docker image
381+
382+
```shell
383+
docker build -t <your-image-name> .
384+
```
385+
386+
### Run Docker image in container and map port
387+
388+
#### Run image in detached mode
389+
390+
```shell
391+
docker run -d -p <port-on-host>:<port-inside-docker-container> <your-image-name>
392+
```
393+
394+
#### Run image in foreground mode
395+
396+
```shell
397+
docker run -i -t -p <port-on-host>:<port-inside-docker-container> <your-image-name>
398+
```
399+
400+
### Stop Docker container
401+
402+
#### Detached mode
403+
404+
```shell
405+
docker stop <container-id>
406+
```
407+
408+
You can get a list of all running Docker container and its ids by following command
409+
410+
```shell
411+
docker images
412+
```
413+
414+
#### Foreground mode
415+
416+
Go to console and press <CTRL> + C at any time.
417+
374418
## Further Documentations
375419
376420
| Name & Link | Description |

0 commit comments

Comments
 (0)