Skip to content

Commit

Permalink
feat(core): add docker image for serve/build
Browse files Browse the repository at this point in the history
  • Loading branch information
bandantonio committed Jan 18, 2022
1 parent bc83c30 commit 7d8ca5e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.git
.github
.gitignore
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:17.4.0-alpine3.14 as build
LABEL VERSION="1.0.0"
LABEL MAINTAINER="Anton Zolotukhin"
LABEL NAME="Antmarky is a static-site generator for Markdown"

WORKDIR /antmarky
COPY package.json server.js README.md ./
RUN npm i
COPY . .

FROM node:17.4.0-alpine3.14
COPY --from=build /antmarky /antmarky
RUN mkdir /antmarky/public
WORKDIR /antmarky

ENTRYPOINT [ "npm", "run" ]
CMD [ "serve" ]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Antmarky is a static-site generator for Markdown based on Node.js/EJS.

![Docker Pulls](https://img.shields.io/docker/pulls/bandantonio/antmarky)

## Features

* Zero configuration
Expand Down
21 changes: 19 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,22 @@ Local server will be launched at `http://localhost:8000`.

### Docker

!!! info "Docker image"
Coming soon
#### serve

```
docker run --rm \
--name antmarky-ssg \
-v ${PWD}/docs:/antmarky/docs \
-p 8000:8000 \
bandantonio/antmarky
```

#### build

```
docker run --rm \
--name antmarky-ssg \
-v ${PWD}/docs:/antmarky/docs \
-v ${PWD}/public:/antmarky/public \
bandantonio/antmarky build
```

0 comments on commit 7d8ca5e

Please sign in to comment.