Skip to content

Commit b50eab3

Browse files
committed
improve usability with Docker
1 parent 50826e9 commit b50eab3

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ WORKDIR /app
33

44
COPY ["package.json", "./"]
55
COPY ["gulpfile.js", "./"]
6-
COPY ["app", "./app"]
76

87
RUN npm install gulp -g
98
RUN npm install
9+
10+
COPY ["app", "./app"]
11+
1012
RUN gulp build
1113

12-
CMD ["gulp", "serve"]
14+
CMD ["gulp", "serve"]

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,15 @@ A browser should launch viewing [https://localhost:3000](https://localhost:3000)
8686

8787
### Option 2: Use Docker
8888

89-
1. docker build --tag devjava .
90-
1. docker run --publish 3000:3000 devjava
89+
1. `docker build --tag devjava .`
90+
1. `docker run --publish 3000:3000 --rm devjava`
9191

9292
You should then be able to open a browser and visit [https://localhost:3000](https://localhost:3000)
9393

94+
In order to automatically update the site when editing an article, it is possible to mount a volume:
95+
96+
1. `docker build --tag devjava .`
97+
1. `docker run --publish 3000:3000 --rm -v $PWD/app:/app/app devjava`
9498

9599
## Working with Content
96100

0 commit comments

Comments
 (0)