Skip to content

Commit 3835883

Browse files
authored
Add Dockerfile (michaljaz#120)
1 parent 56ab220 commit 3835883

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:14
2+
WORKDIR /usr/src/app
3+
COPY package*.json ./
4+
RUN npm install
5+
COPY . .
6+
EXPOSE 8080
7+
ENTRYPOINT ["npm", "start"]

docs/DEVELOPMENT.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,22 @@ If you want to just download webmc production files [click here](https://github.
5959
## If you can't build project with default configuration
6060

6161
Here are the instructions on how to do it correctly [click here](https://github.com/michaljaz/webmc/blob/master/.github/workflows/github-pages.yaml).
62+
63+
## Creating a Docker container
64+
65+
First install Docker. I won't get into this here, there are millions of resources online to assist you with that. First thing you have to build the image. The docker file is included with the project.
66+
67+
```bash
68+
git clone https://github.com/michaljaz/webmc.git && cd webmc
69+
```
70+
Next build the Docker image
71+
72+
```bash
73+
docker build . -t michaljaz/webmc
74+
```
75+
After the docker image has been built, you can then run the docker image with the following
76+
77+
```bash
78+
docker run -p 8080:8080 -d michaljaz/webmc
79+
```
80+
Now open your browser to http://localhost:8080

0 commit comments

Comments
 (0)